-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-dev.yml
104 lines (103 loc) · 2.36 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
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
97
98
99
100
101
102
103
104
version: '3'
services:
frontend:
user: "${UID}:${GID}"
image: hci/frontend:latest
command: npm start
container_name: frontend
depends_on:
- backend
expose:
- "3000"
volumes:
- ./src/frontend/src:/usr/src/src
- frontend:/usr/src/
- ./src/frontend/public:/usr/src/public
- front_node_modules:/usr/src/node_modules
environment:
- HOST=0.0.0.0
- PORT=${FRONTEND_PORT}
- CHOKIDAR_USEPOLLING=true
- API_HOST=${BACKEND_RUNNING_ON}
- API_PORT=${BACKEND_PORT}
backend: &backend
user: "container_user:container_user"
image: hci/backend:latest
container_name: backend
command: manage runserver 0.0.0.0:8000
tty: true
stdin_open: true
depends_on:
- db
- rabbitmq
- celery_worker
expose:
- "8000"
volumes:
- ./src/backend:/opt/backend
env_file:
- .env
db:
image: postgres:12.1
restart: unless-stopped
container_name: database
volumes:
- pgdata:/var/lib/postgresql/data/
env_file:
- .env
rabbitmq:
image: rabbitmq:3.8.2-alpine
container_name: rabbitmq
healthcheck:
test: [ "CMD", "nc", "-z", "localhost", "5672" ]
interval: 5s
timeout: 15s
retries: 1
celery_worker:
<<: *backend
container_name: celery_worker
command: celery -A project worker --loglevel=info --sentry=${SENTRY_DSN}
ports: []
tty: false
stdin_open: false
depends_on:
- rabbitmq
- db
celery_beat:
<<: *backend
container_name: celery_beat
command: celery -A project beat --loglevel=info --sentry=${SENTRY_DSN}
ports: []
tty: false
stdin_open: false
depends_on:
- rabbitmq
- db
nginx:
image: nginx:1.17.6
restart: always
container_name: nginx
ports:
- 80:80
- "443:443"
volumes:
- ./conf/nginx-proxy-dev.conf:/etc/nginx/conf.d/default.conf:ro
- ./src/backend:/opt/backend
- ./ssl/concatenated.cer:/etc/ssl/concatenated.cer
- ./ssl/private_key.key:/etc/ssl/private_key.key
depends_on:
- backend
volumes:
pgdata:
frontend:
driver: local
driver_opts:
type: none
device: $PWD/src/frontend/
o: bind
front_node_modules:
driver: local
driver_opts:
type: none
device: $PWD/src/frontend/node_modules
o: bind