From 38b4fc5e6cb5e2439e1647c8f1ec097da9e00192 Mon Sep 17 00:00:00 2001 From: Dave Jansen Date: Sat, 16 Feb 2019 18:44:33 +0900 Subject: [PATCH] WIP --- config/traefik.toml | 6 +++++- docker-compose.yml | 25 ++++++++++++++++--------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/config/traefik.toml b/config/traefik.toml index 815b645..a277bd1 100644 --- a/config/traefik.toml +++ b/config/traefik.toml @@ -6,12 +6,14 @@ defaultEntryPoints = ["http", "https"] [entryPoints] [entryPoints.http] address = ":80" + # Uncomment the following two lines to redirect HTTP to HTTPS. #[entryPoints.http.redirect] #entryPoint = "https" + [entryPoints.https] address = ":443" - [entryPoints.https.tls] + [entryPoints.https.tls] # These options are for Traefik's integration with Docker. [docker] @@ -20,6 +22,8 @@ domain = "docker.localhost" watch = true exposedByDefault = false +[api] + # These options are for Traefik's integration with Let's Encrypt. # Your certificates are stored inside /acme.json inside the container, # which is /root/compose/acme.json on your server. diff --git a/docker-compose.yml b/docker-compose.yml index ff02e8b..cacde8c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,7 +20,7 @@ services: traefik: # https://hub.docker.com/_/traefik/ image: traefik:alpine - command: --api --docker --acme.email="${ACME_EMAIL}" + command: --web --docker --acme.email="${ACME_EMAIL}" restart: always networks: - backend @@ -33,11 +33,12 @@ services: # Map port 80 and 443 on the host to this container. - "80:80" - "443:443" + #- "8000:8080" # Traefik Dashboard labels: - "traefik.docker.network=frontend" - "traefik.enable=true" - - "traefik.frontend.rule=Host:${TRAEFIK_DOMAINS}; PathPrefixStrip:/traefik/" - - "traefik.port=80" + - "traefik.frontend.rule=Host:${TRAEFIK_DOMAINS}" + - "traefik.port=8080" - "traefik.protocol=http" # Remove next line to disable login prompt for the dashboard. #- "traefik.frontend.auth.basic=${BASIC_AUTH}" @@ -71,8 +72,8 @@ services: MYSQL_USER: ${MATOMO_DB_USER} MYSQL_PASSWORD: ${MATOMO_DB_PASSWORD} - matomo: - image: matomo:latest + ghost: + image: ghost:latest links: - db networks: @@ -80,14 +81,20 @@ services: - frontend volumes: # To allow you to view/edit Matomo configuration files: - - ./config/ghost:/var/www/html/config:rw - - ./logs:/var/www/html/logs + - ./content:/var/lib/ghost/content:rw + #- ./logs:/var/www/html/logs labels: - "traefik.docker.network=frontend" - "traefik.enable=true" - "traefik.frontend.rule=Host:${DOMAINS}" - - "traefik.port=80" + - "traefik.port=2368" - "traefik.protocol=http" + environment: + database__client: mysql + database__connection__host: db + database__connection__user: ${MATOMO_DB_USER} + database__connection__password: ${MATOMO_DB_PASSWORD} + database__connection__database: ${MATOMO_DB_NAME} # Uncomment the next line to enable HSTS header. #- "traefik.frontend.headers.STSSeconds=15768000" @@ -112,7 +119,7 @@ services: labels: - "traefik.docker.network=frontend" - "traefik.enable=true" - - "traefik.frontend.rule=Host:${MATOMO_DOMAINS}; PathPrefixStrip:/matomo/" + - "traefik.frontend.rule=Host:${MATOMO_DOMAINS}" - "traefik.port=80" - "traefik.protocol=http" # Uncomment the next line to enable HSTS header.