-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
145 lines (128 loc) · 3.24 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
version: '3.8'
services:
client:
container_name: client
build:
context: ./client
dockerfile: Dockerfile.dev
restart: unless-stopped
depends_on:
- core
ports:
- 3000:3000
volumes:
- ./client:/usr/src/app/client
- /usr/src/app/client/node_modules/
environment:
- NODE_OPTIONS=--max-old-space-size=4096
- CHOKIDAR_USEPOLLING=true
core:
container_name: core
build:
context: ./core
dockerfile: Dockerfile.dev
restart: unless-stopped
entrypoint: ./entrypoint.dev.sh
command: python manage.py runserver 0.0.0.0:8000
depends_on:
database:
condition: service_healthy
elastic:
condition: service_healthy
redis:
condition: service_healthy
celery:
condition: service_healthy
ports:
- 8000:8000
volumes:
- ./core:/usr/src/app/core
- django_media_volume:/usr/src/app/core/django_media
env_file:
- ./env_files/core/.dev.env
database:
container_name: database
image: postgres:15-alpine
restart: unless-stopped
ports:
- 5432:5432
volumes:
- dev_database_volume:/var/lib/postgresql/data
env_file:
- ./env_files/database/.dev.env
healthcheck:
test: pg_isready
interval: 30s
timeout: 10s
retries: 5
redis:
container_name: redis
image: redis:7-alpine
restart: unless-stopped
ports:
- 6379:6379
command: redis-server /usr/local/etc/redis/redis.dev.conf
volumes:
- ./redis/redis.dev.conf:/usr/local/etc/redis/redis.dev.conf
healthcheck:
test: redis-cli -a $REDIS_PASSWORD --raw incr ping
interval: 30s
timeout: 10s
retries: 5
celery:
container_name: celery
build:
context: ./core
dockerfile: Dockerfile.dev
restart: unless-stopped
command: celery -A core.celery_app worker --loglevel=info --logfile=celery.log
depends_on:
redis:
condition: service_healthy
volumes:
- django_media_volume:/usr/src/app/core/django_media
env_file:
- ./env_files/core/.dev.env
- ./env_files/celery/.dev.env
healthcheck:
test: celery -A core.celery_app inspect ping
interval: 30s
timeout: 10s
retries: 5
flower:
container_name: flower
build:
context: ./core
dockerfile: Dockerfile.dev
restart: unless-stopped
command: celery -A core.celery_app flower --port=5555
ports:
- 5555:5555
env_file:
- ./env_files/core/.dev.env
- ./env_files/flower/.dev.env
depends_on:
redis:
condition: service_healthy
celery:
condition: service_healthy
elastic:
container_name: elastic
image: elasticsearch:7.14.0
restart: unless-stopped
ports:
- 9200:9200
environment:
- "bootstrap.memory_lock=true"
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
env_file:
- ./env_files/elastic/.dev.env
healthcheck:
test: curl -s http://elastic:$ELASTIC_PASSWORD@elastic:9200 >/dev/null || exit 1
interval: 30s
timeout: 10s
start_period: 10s
retries: 10
volumes:
dev_database_volume:
django_media_volume: