-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-staging.yml
74 lines (67 loc) · 1.44 KB
/
docker-compose-staging.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
version: "3"
services:
rabbit:
image: rabbitmq
restart: always
environment:
- RABBITMQ_DEFAULT_USER=rabbit
- RABBITMQ_DEFAULT_PASS=rabbit
ports:
- "5672:5672"
- "15672:15672"
cache:
image: memcached
ports:
- "11211:11211"
entrypoint:
- memcached
- -m 64
db:
image: postgres
restart: always
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
depends_on:
- cache
- rabbit
backend:
build: ./backend
ports:
- "8000:8000"
environment:
- POSTGRES_NAME=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- RABBITMQ_DEFAULT_USER=rabbit
- RABBITMQ_DEFAULT_PASS=rabbit
command: sh -c "python3 manage.py migrate && celery -A backend worker -l info --detach && gunicorn backend.wsgi --bind 0.0.0.0:8000"
depends_on:
db:
condition: service_healthy
frontend:
build: ./frontend
volumes:
- frontend:/app/frontend/build
depends_on:
- backend
command: npm run build
nginx:
build: ./nginx
ports:
- "80:80"
volumes:
- frontend:/var/www/frontend
depends_on:
- frontend
volumes:
frontend:
db-data: