-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
94 lines (87 loc) · 2.09 KB
/
docker-compose.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
services:
app:
image: &app ghcr.io/beeracademy/web
restart: always
networks:
- traefik
- default
volumes:
- ./media:/app/media
- ./static:/app/static
- ./.env:/app/.env
labels:
- traefik.enable=true
- traefik.http.routers.academy-beer.rule=Host(`academy.beer`)
- traefik.http.services.academy-beer.loadbalancer.server.port=8000
depends_on:
- db
- media
- static
- redis
celery:
image: *app
restart: always
command: ["celery", "--app=academy", "worker", "--loglevel=INFO"]
volumes:
- ./.env:/app/.env
depends_on:
- app
- redis
- db
celery-beat:
image: *app
restart: always
command:
[
"./wait_for_app",
"celery",
"--app=academy",
"beat",
"--loglevel=INFO",
"--scheduler=django_celery_beat.schedulers:DatabaseScheduler",
]
volumes:
- ./.env:/app/.env
depends_on:
- app
- redis
- db
db:
image: postgres:15
restart: always
volumes:
- ./postgres-data-15:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=db
media:
image: nginx:alpine
restart: always
volumes:
- ./media:/usr/share/nginx/html
- ./nginx-default.conf:/etc/nginx/conf.d/default.conf
networks:
- traefik
labels:
- traefik.enable=true
- traefik.http.routers.media-academy-beer.rule=Host(`media.academy.beer`)
- traefik.http.services.media-academy-beer.loadbalancer.server.port=80
static:
image: nginx:alpine
restart: always
volumes:
- ./static:/usr/share/nginx/html
- ./nginx-default.conf:/etc/nginx/conf.d/default.conf
networks:
- traefik
labels:
- traefik.enable=true
- traefik.http.routers.static-academy-beer.rule=Host(`static.academy.beer`)
- traefik.http.services.static-academy-beer.loadbalancer.server.port=80
redis:
image: redis:alpine
restart: always
networks:
traefik:
external: true