-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
51 lines (48 loc) · 1.45 KB
/
docker-compose.prod.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
version: '3.8'
# setup the network
networks:
frontend:
external:
name: reverse-proxy
backend:
driver: bridge
services:
db:
image: mariadb
restart: always
command: --max-allowed-packet=64MB
volumes:
- ./data/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
networks:
- backend
app:
image: matomo
restart: always
volumes:
- ./data/matomo/config:/var/www/html/config
- ./data/matomo/logs:/var/www/html/logs
environment:
- MATOMO_DATABASE_HOST=db
- MATOMO_DATABASE_ADAPTER=${MATOMO_DATABASE_ADAPTER}
- MATOMO_DATABASE_TABLES_PREFIX=${MATOMO_DATABASE_TABLES_PREFIX}
- MATOMO_DATABASE_USERNAME=${MATOMO_DATABASE_USERNAME}
- MATOMO_DATABASE_PASSWORD=${MATOMO_DATABASE_PASSWORD}
- MATOMO_DATABASE_DBNAME=${MATOMO_DATABASE_DBNAME}
# add the labels to the service configuration
labels:
- "traefik.enable=true"
- "traefik.docker.network=reverse-proxy"
# https
- "traefik.http.routers.matomo.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.matomo.entrypoints=websecure"
- "traefik.http.routers.matomo.tls=true"
- "traefik.http.routers.matomo.tls.certresolver=letsencrypt"
# add the network to the service configuration
networks:
- frontend
- backend