-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (53 loc) · 1.45 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
version: '3.9'
services:
# Front-End configuration for the running application
# Exposed for all HTTP and HTTPS traffic, routed via port 8888
# ---------------
frontend:
build:
context: frontend/
depends_on:
- db
volumes:
- ./frontend/webroot:/var/www
env_file:
- ./frontend/secrets.txt
- ./db/secrets_shared.txt
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.entrypoints=web"
- "traefik.http.routers.frontends.entrypoints=websecure"
- "traefik.http.routers.frontends.tls=true"
- "traefik.http.services.web.loadbalancer.server.port=8888"
# MySQL/Maria Database Configuration
# Ports 3306 Exposed for local traffic only
# -----------------
db:
image: mariadb:10
env_file:
- ./db/secrets.txt
- ./db/secrets_shared.txt
volumes:
- vol_db:/var/lib/mysql
- ./db/db-init:/docker-entrypoint-initdb.d
ports:
- "3306:3306"
# Reverse Proxy to handle HTTP/HTTPS traffic.
# Port 8080 is exposed to show diag info. See /proxy/config.toml for proxy config
# -----------------
proxy:
image: traefik:v2.9
depends_on:
- frontend
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./proxy/acme.json:/shared/acme.json
- ./proxy/config.toml:/etc/traefik/traefik.toml
- ./proxy/logs/:/shared/logs/
# Mounts
volumes:
vol_db: