-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.dev.yaml
74 lines (68 loc) · 1.61 KB
/
compose.dev.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
63
64
65
66
67
68
69
70
71
72
73
74
x-default-django:
&default-django
build:
context: ./django
dockerfile: Dockerfile
args:
UNAME: "${USER:-app}"
UID: "${UID:-1000}"
REQUIREMENTS: "${REQUIREMENTS:-/requirements/dev.pip}"
env_file:
- .env
environment:
environment:
DJANGO_SETTINGS_MODULE: core.settings.dev
DJANGO_SUPERUSER_EMAIL: [email protected]
DJANGO_SUPERUSER_PASSWORD: secret
volumes:
- ./django:/home/${USER:-app}/code
services:
#--development only--#
postgres:
image: postgres:16
environment:
POSTGRES_USER: django
POSTGRES_PASSWORD: django
POSTGRES_DB: django
volumes:
- postgres_data:/var/lib/postgresql/data/
restart: unless-stopped
#--------------------#
redis:
image: redis:7
command: redis-server --save 60 1 --appendonly yes --loglevel warning
restart: unless-stopped
django:
<< : *default-django
command: python manage.py runserver 0.0.0.0:8000 --nostatic
entrypoint: /home/${USER:-app}/code/entrypoint.sh
expose:
- "8000"
depends_on:
- postgres
- redis
restart: unless-stopped
huey:
<< : *default-django
command: python manage.py run_huey
depends_on:
- django
restart: unless-stopped
caddy:
image: caddy:2
command: "caddy run --config /etc/caddy/Caddyfile.dev --adapter caddyfile"
env_file:
- .env
ports:
- "${PORT:-81}:${PORT:-81}"
volumes:
- ./caddy:/etc/caddy
- caddy_data:/data
- caddy_config:/config
depends_on:
- django
restart: unless-stopped
volumes:
caddy_data:
caddy_config:
postgres_data: