Skip to content

Commit

Permalink
#55 Added docker compose files for local development for Linux enviro…
Browse files Browse the repository at this point in the history
…nment
  • Loading branch information
vikrantcue committed Sep 16, 2021
1 parent 61649cc commit 181e405
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export ZEPPELIN_PORT=8080
export POSTGRES_DB_HOST="localhost"
export POSTGRES_DB_USERNAME="postgres"
export POSTGRES_DB_PASSWORD="postgres"
export POSTGRES_DB_SCHEMA="cuelake_db"
export POSTGRES_DB_SCHEMA="cuelake"
export POSTGRES_DB_PORT=5432

## Metastore Settings
Expand Down
10 changes: 10 additions & 0 deletions api/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# production environment
FROM python:3.7-slim
ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install nginx vim -y --no-install-recommends
WORKDIR /code
COPY requirements.txt /code/
RUN pip install -r requirements.txt --no-cache-dir
EXPOSE 8000
STOPSIGNAL SIGTERM
CMD ["/code/start_server.dev.sh"]
47 changes: 47 additions & 0 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: '3.8'

services:
cuelake-ui:
build:
context: ./ui
dockerfile: Dockerfile.dev
ports:
- "3000:3000"
stdin_open: true
network_mode: "host"
volumes:
- ./ui:/app
- /app/node_modules
cuelake-api:
build:
context: ./api
dockerfile: Dockerfile.dev
environment:
- ENVIRONMENT=dev
ports:
- "8000:8000"
stdin_open: true
depends_on:
- postgres
- redis
network_mode: "host"
volumes:
- ./api:/code
- C:/Users/Prabhat/laker-private/.kube:/.kube
postgres:
image: postgres:13
ports:
- "5432:5432"
environment:
- PGDATA=/pg_data
- POSTGRES_DB=cuelake
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
volumes:
- /pg_data
network_mode: "host"
redis:
ports:
- "6379:6379"
image: "redis:alpine"
network_mode: "host"
10 changes: 10 additions & 0 deletions ui/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# dev environment
FROM node:14-alpine
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY ./package.json /app/package.json
RUN cat package.json
RUN npm install
RUN which npm
EXPOSE 3000
CMD ["/usr/local/bin/npm", "start"]

0 comments on commit 181e405

Please sign in to comment.