-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-dev.yml
65 lines (60 loc) · 1.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
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
volumes:
- ./data/db:/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"
volumes:
- ./backend:/app/backend
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 && python3 manage.py runserver 0.0.0.0:8000"
depends_on:
db:
condition: service_healthy
frontend:
build: ./frontend
volumes:
- ./frontend:/app/frontend
- /app/frontend/node_modules
ports:
- "3000:3000"
depends_on:
- backend
command: npm run start