forked from lukas2511/voctoconf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
83 lines (81 loc) · 2.63 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
version: '3.7'
services:
app:
build: .
image: voctoconf
restart: always
command: gunicorn voctoconf.wsgi:application --bind 0.0.0.0:8000
volumes:
- django_static:/app/_static
- django_media:/app/_media
- ./_db.sqlite3:/app/_db.sqlite3
- ./_bbb_secrets:/app/_bbb_secrets
labels:
traefik.enable: "true"
traefik.docker.network: "web"
traefik.http.routers.voctoconf.rule: "Host(`virtual.piandmore.de`)"
traefik.http.routers.voctoconf.entrypoints: "web"
traefik.http.routers.voctoconf.middlewares: "redirect-to-https@file, add-sts-with-subdomains@file"
traefik.http.routers.voctoconfsecure.rule: "Host(`virtual.piandmore.de`)"
traefik.http.routers.voctoconfsecure.tls.certresolver: "le"
traefik.http.routers.voctoconfsecure.entrypoints: "websecure"
traefik.http.routers.voctoconfsecure.middlewares: "add-sts-with-subdomains@file"
networks:
- default
- redis
- web
environment:
DJANGO_MANAGEPY_MIGRATE: "on"
DJANGO_MANAGEPY_COLLECTSTATIC: "on"
env_file:
- prod.env
redis:
image: redis:latest
restart: always
networks:
- redis
labels:
com.centurylinklabs.watchtower.enable: "true"
nginx:
image: nginx:stable-alpine
restart: always
volumes:
- django_static:/app/_static
- django_media:/app/_media
- ./nginx.conf:/etc/nginx/nginx.conf
networks:
- default
- web
labels:
traefik.enable: "true"
traefik.docker.network: "web"
traefik.http.routers.voctoconfstatic.rule: "Host(`virtual.piandmore.de`) && (PathPrefix(`/static`) || PathPrefix(`/media`))"
traefik.http.routers.voctoconfstatic.entrypoints: "web"
traefik.http.routers.voctoconfstatic.middlewares: "redirect-to-https@file, add-sts-with-subdomains@file"
traefik.http.routers.voctoconfstaticsecure.rule: "Host(`virtual.piandmore.de`) && (PathPrefix(`/static`) || PathPrefix(`/media`))"
traefik.http.routers.voctoconfstaticsecure.tls.certresolver: "le"
traefik.http.routers.voctoconfstaticsecure.entrypoints: "websecure"
traefik.http.routers.voctoconfstaticsecure.middlewares: "add-sts-with-subdomains@file"
cron:
image: voctoconf
restart: always
command: '/app/cron.sh'
volumes:
- django_static:/app/_static
- django_media:/app/_media
- ./_db.sqlite3:/app/_db.sqlite3
- ./_bbb_secrets:/app/_bbb_secrets
- '/etc/localtime:/etc/localtime:ro'
networks:
- default
env_file:
- prod.env
volumes:
django_static:
django_media:
networks:
default:
redis:
web:
external:
name: web