-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.prod.yml
60 lines (55 loc) · 1.2 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version: '3'
services:
web:
build:
context: ./taskjo
dockerfile: Dockerfile.prod
command: >
sh -c "python3 manage.py migrate &&
python3 manage.py runserver 0.0.0.0:8080"
volumes:
- static_volume:/home/taskjo/web/staticfiles
- media_volume:/home/taskjo/web/mediafiles
# expose:
# - 8000
ports:
- "8060:8080"
env_file:
- ./.env.prod
depends_on:
- db
db:
image: postgres:14-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env.prod.db
redis:
image: redis:latest
celery:
restart: always
build:
context: .
# command: celery -A app worker -l info
command: celery -A taskjo worker -B -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
volumes:
- ./taskjo:/taskjo
env_file:
- ./.env.dev
depends_on:
- db
- redis
- web
# nginx:
# build: ./nginx
# volumes:
# - static_volume:/home/taskjo/web/staticfiles
# - media_volume:/home/taskjo/web/mediafiles
# ports:
# - 1337:80
# depends_on:
# - web
volumes:
postgres_data:
static_volume:
media_volume: