-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.dev.yml
52 lines (48 loc) · 1.62 KB
/
docker-compose.dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: '3'
services:
backend:
build:
context: ./backend/
dockerfile: Dockerfile.dev
# command: bash -c "rm -f db.sqlite3 && python manage.py migrate && python -m pytest --reuse-db && python manage.py runserver 0.0.0.0:8000"
command: bash -c "python manage.py runserver 0.0.0.0:8000"
container_name: django_saas_backend
volumes:
- ./backend:/django-saas-backend
ports:
- "8000:8000"
environment:
- SECRET_KEY=${SECRET_KEY}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_STORAGE_BUCKET_NAME=${AWS_STORAGE_BUCKET_NAME}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_S3_REGION_NAME=${AWS_S3_REGION_NAME}
worker:
build:
context: ./backend/
dockerfile: Dockerfile.dev
command: bash -c "./wait-for-it.sh -t 100 django_saas_backend:8000 -- python manage.py qcluster"
container_name: django_saas_worker
depends_on:
- "backend"
volumes:
- ./backend:/django-saas-backend
environment:
- SECRET_KEY=${SECRET_KEY}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
- AWS_STORAGE_BUCKET_NAME=${AWS_STORAGE_BUCKET_NAME}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_S3_REGION_NAME=${AWS_S3_REGION_NAME}
frontend:
build:
context: ./frontend/
dockerfile: Dockerfile.dev
command: sh -c "cd saas && sh set-env.sh /django-saas-frontend/saas/src/ && npm start"
container_name: django_saas_frontend
volumes:
- ./frontend/:/django-saas-frontend
ports:
- "4200:4200"
environment:
- API_BASE_URL=${API_BASE_URL}
- APP_BASE_URL=${APP_BASE_URL}