-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
121 lines (112 loc) · 2.31 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
121 lines (112 loc) · 2.31 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
version: '3.8'
services:
nginx:
build:
dockerfile: Dockerfile.dev
context: ./nginx/
container_name: nginx
ports:
- "80:80"
- "443:443"
depends_on:
- frontend
- backend
frontend:
build:
dockerfile: Dockerfile.dev
context: ./frontend/
command: >
sh -c "npm start"
container_name: frontend
volumes:
- /app/node_modules
- /app/build
- ./frontend:/app
ports:
- "82:3000"
environment:
- WATCHPACK_POLLING=true
depends_on:
- backend
stdin_open: true
tty: true
backend:
build:
dockerfile: Dockerfile
context: ./backend
command: >
sh -c "python manage.py migrate --run-syncdb &&
python manage.py collectstatic --noinput &&
python manage.py runserver 0.0.0.0:8000"
container_name: backend
image: backend-img
volumes:
- ./backend:/app
ports:
- "81:8000"
env_file:
- .env.dev
depends_on:
db:
condition: service_healthy
db:
image: postgres:15
container_name: db
volumes:
- ./data/db:/var/lib/postgresql/data
env_file:
- .env.db
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 3s
timeout: 5s
retries: 10
rabbitmq:
restart: always
image: rabbitmq:management
container_name: rabbitmq
hostname: rabbit
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=admin
ports:
- "5672:5672"
- "15672:15672"
worker:
image: backend-img
container_name: worker
env_file:
- .env.dev
command: >
sh -c "celery -A app worker -l info"
depends_on:
- rabbitmq
celery-beat:
image: backend-img
container_name: celery-beat
env_file:
- .env.dev
command: >
sh -c "celery -A app beat -l info"
depends_on:
- rabbitmq
redis:
image: redis:latest
container_name: redis
command: redis-server
hostname: redis
volumes:
- ./redis:/var/lib/redis
ports:
- 6379:6379
telebot:
image: backend-img
container_name: telebot
env_file:
- .env.dev
command: >
sh -c "python manage.py runbot"
depends_on:
- backend