forked from pythonindia/junction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
46 lines (41 loc) · 915 Bytes
/
docker-compose.prod.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
version: '3.8'
services:
db:
image: postgres:15-alpine
ports:
- "5432:5432"
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- .env
redis:
image: redis:latest
ports:
- "6379:6379"
restart: always
command: sh -c 'redis-server --requirepass ${REDIS_HOST_PASSWORD}'
web:
image: ananyo2012/junction:1.1
volumes:
- .:/code
ports:
- "${SERVER_PORT}:${SERVER_PORT}"
restart: always
depends_on:
- db
env_file:
- .env
command: sh -c 'python manage.py migrate && python manage.py collectstatic --noinput --clear && gunicorn -c gunicorn.conf.py'
celery:
image: ananyo2012/junction:1.1
depends_on:
- db
- redis
- web
restart: always
env_file:
- .env
command: sh -c 'celery -A junction worker -l info -E'
volumes:
postgres_data: