-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
62 lines (57 loc) · 1.29 KB
/
compose.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
57
58
59
60
61
62
x-default-django:
&default-django
build:
context: ./django
dockerfile: Dockerfile
args:
UNAME: "${USER:-app}"
UID: "${UID:-1000}"
REQUIREMENTS: "${REQUIREMENTS:-/requirements/prod.pip}"
env_file:
- .env
environment:
DJANGO_SETTINGS_MODULE: core.settings.prod
volumes:
- ./django:/home/app/django
tty: true
stdin_open: true
services:
redis:
image: redis:7
command: redis-server --save 60 1 --appendonly yes --loglevel warning
restart: unless-stopped
django:
<< : *default-django
command: python -m gunicorn core.asgi:application -k uvicorn.workers.UvicornWorker
entrypoint: /home/${USER:-app}/code/entrypoint.sh
expose:
- "8000"
depends_on:
- redis
restart: unless-stopped
huey:
<< : *default-django
command: django-admin run_huey
depends_on:
- django
restart: unless-stopped
caddy:
image: caddy:2
command: "caddy run --config /etc/caddy/Caddyfile.prod --adapter caddyfile"
env_file:
- .env
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./caddy:/etc/caddy
- caddy_data:/data
- caddy_config:/config
depends_on:
- django
restart: unless-stopped
volumes:
caddy_data:
external: true
caddy_config: