forked from gbozee/pyconng
-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
105 lines (92 loc) · 3.06 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
95
96
97
98
99
100
101
102
103
104
version: '3.8'
networks:
app: null
volumes:
postgres_data: {}
postgres_backup: {}
lets_encrypt_dev: {}
staticfiles: {}
mediafiles: {}
postgres_data_dev: {}
postgres_backup_dev: {}
admin_postgres_data_dev: {}
production_traefik: {}
media_backups: {}
pocketbase_db: {}
postgres_data_dev_job_control: {}
services:
postgres:
build: ./compose/postgres
volumes:
- postgres_data:/var/lib/postgresql/data
- postgres_backup:/backups
env_file: ./new.env
ports:
- "5433:5432"
postgres_slave:
build: ./compose/postgres
links:
- postgres:master
env_file: ./new.env
web:
image: registry.gitlab.com/tuteria/tuteria/pyconng:latest
# user: django
depends_on:
- postgres
- redis
volumes:
- mediafiles:/var/pyconng
- staticfiles:/var/pyconng_static
command: /gunicorn.sh
env_file: ./new.env
pycon_app:
restart: always
image: registry.gitlab.com/tuteria/tuteria/pycon-app:latest
container_name: pycon-app
# build:
# context: ./compose/nginx
# dockerfile: Dockerfile-django
depends_on:
- web
volumes:
- staticfiles:/var/pyconng_static
- mediafiles:/var/pyconng
labels:
- "traefik.enable=true"
- "traefik.http.routers.pycon_app.rule=Host(`pycon.beeola.me`)"
- "traefik.http.routers.pycon_app.priority=1"
- "traefik.http.routers.pycon_app.entryPoints=web-secure"
- "traefik.http.routers.pycon_app.middlewares=csrf"
- "traefik.http.services.pycon_app.loadBalancer.sticky.cookie={}"
- "traefik.http.services.pycon_app.loadBalancer.server.port=80"
- "traefik.http.routers.pycon_app.tls.certResolver=letsencrypt"
traefik:
image: traefik:v2.2
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- production_traefik:/etc/traefik/acme:z
command:
- --providers.docker
- --providers.docker.exposedbydefault=false
# - --providers.docker.swarmmode
# Enable the access log, with HTTP requests
- --accesslog
- --log
- "--api.dashboard=true"
- "--api.insecure=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.web.http.redirections.entryPoint.to=web-secure"
- "--entrypoints.web-secure.address=:443"
- "--entrypoints.flower.address=:5555"
# - "--entrypoints.web.forwardedHeaders.insecure=true"
# - "--entrypoints.web-secure.forwardedHeaders.insecure=true"
- "--certificatesResolvers.letsencrypt_web.acme.email=biola@tuteria.com"
- "--certificatesResolvers.letsencrypt_web.acme.storage=/etc/traefik/acme/acme.json"
- "--certificatesResolvers.letsencrypt_web.acme.httpChallenge.entryPoint=web"
- "--certificatesResolvers.letsencrypt.acme.storage=/etc/traefik/acme/acme.json"
- "--certificatesResolvers.letsencrypt.acme.dnsChallenge.provider=digitalocean"
- "--certificatesResolvers.letsencrypt.acme.dnsChallenge.delayBeforeCheck=0"
redis:
image: redis:alpine
restart: always