-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose-traefik.yml
70 lines (64 loc) · 1.6 KB
/
docker-compose-traefik.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
version: '3'
services:
traefik:
image: traefik
command: --api --docker
restart: always
labels:
- "traefik.enable=false"
ports:
- "80:80"
- "443:443"
- "8080:8080"
networks:
- proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /srv/traefik/traefik.toml:/traefik.toml
- /srv/traefik/acme.json:/acme.json
container_name: traefik
database:
image: mariadb:latest
restart: always
labels:
- "traefik.enable=false"
environment:
MYSQL_ROOT_PASSWORD: "my-secret-pw"
MYSQL_DATABASE: antragsgruen
networks:
- database
volumes:
- antragsgruen_db_c:/etc/mysql/conf.d/
- antragsgruen_db_d:/var/lib/mysql
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
antragsgruen:
image: devopsansiblede/antragsgruen:latest
restart: always
networks:
- proxy
- database
labels:
- "traefik.frontend.rule=Host:motiontool.example.com"
- "traefik.backend=motion tool Antragsgruen"
- "traefik.frontend.entryPoints=http,https"
- "traefik.port=80"
- "traefik.protocol=http"
- "traefik.docker.network=proxy"
environment:
- TIMEZONE="Europe/Berlin"
- SMTP_HOST=mail.example.com
- SMTP_PORT=587
- SMTP_FROM=motiontool@example.com
- SMTP_USER=motiontool@example.com
- SMTP_PASS="I'am very Secr3t!"
volumes:
- antragsgruen:/var/www/html
networks:
proxy:
external: true
database:
external: true
volumes:
antragsgruen:
antragsgruen_db_c:
antragsgruen_db_d: