56 lines
1.9 KiB
YAML
56 lines
1.9 KiB
YAML
version: "3.7"
|
|
|
|
volumes:
|
|
histoiredunpied-log-volume:
|
|
name: histoiredunpied-log-volume
|
|
|
|
services:
|
|
histoiredunpied:
|
|
container_name: ${NAME}
|
|
build: .
|
|
environment:
|
|
- TZ=${TIMEZONE}
|
|
volumes:
|
|
- histoiredunpied-log-volume:/var/log/nginx
|
|
labels:
|
|
traefik.enable: "true"
|
|
|
|
# Redirect http:// to https://
|
|
traefik.http.routers.histoiredunpied.rule: "Host(`${URL}`)"
|
|
traefik.http.routers.histoiredunpied.entrypoints: "web"
|
|
traefik.http.routers.histoiredunpied.middlewares: "redirect-https@docker"
|
|
|
|
traefik.http.routers.histoiredunpied-https.rule: "Host(`${URL}`)"
|
|
traefik.http.routers.histoiredunpied-https.entrypoints: "websecure"
|
|
traefik.http.routers.histoiredunpied-https.tls.certResolver: "letsencrypt"
|
|
|
|
# Redirect http://www to https://
|
|
traefik.http.routers.histoiredunpied-redirect-www.rule: "Host(`www.${URL}`)"
|
|
traefik.http.routers.histoiredunpied-redirect-www.entrypoints: "web"
|
|
traefik.http.routers.histoiredunpied-redirect-www.middlewares: "redirect-www@docker"
|
|
|
|
# Redirect https://www to https://
|
|
traefik.http.routers.histoiredunpied-redirect-www-https.rule: "Host(`www.${URL}`)"
|
|
traefik.http.routers.histoiredunpied-redirect-www-https.entrypoints: "websecure"
|
|
traefik.http.routers.histoiredunpied-redirect-www-https.tls.certResolver: "letsencrypt"
|
|
traefik.http.routers.histoiredunpied-redirect-www-https.middlewares: "redirect-www@docker"
|
|
|
|
matomo:
|
|
container_name: ${NAME}_matomo
|
|
image: kosssi/matomo-log-analytics
|
|
depends_on:
|
|
- histoiredunpied
|
|
environment:
|
|
MATOMO_URL: ${MATOMO_URL}
|
|
MATOMO_IDSITE: ${MATOMO_IDSITE}
|
|
MATOMO_TOKEN_AUTH: ${MATOMO_TOKEN_AUTH}
|
|
LOG_PATH: ${LOG_PATH}
|
|
CRON_FREQUENCY: ${CRON_FREQUENCY}
|
|
volumes:
|
|
- histoiredunpied-log-volume:/var/log/nginx
|
|
|
|
networks:
|
|
default:
|
|
external:
|
|
name: traefik
|