-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yaml
56 lines (50 loc) · 1.3 KB
/
docker-compose-prod.yaml
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
version: "3.9"
services:
caddy:
image: caddy:2.6-alpine
restart: unless-stopped
ports:
- "8010:8000"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- .:/code
- ./caddy_data:/data
- ./caddy_config:/config
django:
build: .
restart: unless-stopped
volumes:
- ".:/code"
command: sh -c "python manage.py migrate && python manage.py collectstatic --noinput && gunicorn opsp.wsgi -b 0.0.0.0:8000"
env_file: .env
depends_on:
- postgres
postgres:
image: postgres:14
restart: unless-stopped
env_file: .env
environment:
- "POSTGRES_HOST_AUTH_METHOD=trust"
volumes:
- ./postgresdata:/var/lib/postgresql/data
redis:
image: redis:7.0
restart: unless-stopped
celery:
build: .
restart: unless-stopped
command: celery -A opsp worker -l info
env_file: .env
volumes:
- .:/code
depends_on:
- redis
celery-beat:
build: .
restart: unless-stopped
command: celery -A opsp beat -l info
env_file: .env
volumes:
- .:/code
depends_on:
- redis