-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
96 lines (90 loc) · 2.08 KB
/
docker-compose.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
version: "3.8"
services:
postgres:
container_name: postgres
image: postgres:alpine
ports:
- "5432:5432"
# volumes:
# - pg-data:/var/lib/postgresql/data
# - pg-conf:/etc/postgresql
# - pg-log:/var/log/postgresql
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_USER=${POSTGRES_USERNAME}
- POSTGRES_DB=${POSTGRES_NAME}
redis:
container_name: redis
image: redis:alpine
# volumes:
# - redis-data:/data
backend:
container_name: backend
build:
context: ./backend
dockerfile: Dockerfile
volumes:
- ./backend:/backend
ports:
- 8000:8000
environment:
- UWSGI_PY_AUTORELOAD=1
- SECRET_KEY=${SECRET_KEY}
- DEBUG=${DEBUG}
- POSTGRES_NAME=${POSTGRES_NAME}
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_SERVICE_HOST=${POSTGRES_SERVICE_HOST}
- POSTGRES_SERVICE_PORT=${POSTGRES_SERVICE_PORT}
# - CELERY_BROKER_URL=${CELERY_BROKER_URL}
# - CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
command: python manage.py runserver 0.0.0.0:8000
restart: on-failure
depends_on:
- postgres
- redis
frontend:
container_name: frontend
restart: on-failure
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "8080:8080"
volumes:
- ./frontend:/frontend #/:rw
depends_on:
- backend
- postgres
celery:
build:
context: ./backend
dockerfile: Dockerfile
command: celery -A backend worker -l INFO
restart: on-failure
volumes:
- ./backend:/backend
env_file:
- .env
depends_on:
- backend
- redis
- postgres
celery_beat:
build:
context: ./backend
dockerfile: Dockerfile
command: celery -A backend beat -l INFO
volumes:
- ./backend:/backend
env_file:
- .env
depends_on:
- backend
- redis
- postgres
# volumes:
# pg-data:
# pg-conf:
# pg-log:
# redis-data: