Skip to content

Instantly share code, notes, and snippets.

@jsiebens
Created May 13, 2020 06:20
Show Gist options
  • Save jsiebens/33b8a320f1cc595e42c6eef4219063f2 to your computer and use it in GitHub Desktop.
Save jsiebens/33b8a320f1cc595e42c6eef4219063f2 to your computer and use it in GitHub Desktop.
Ghost + Traefik + Inlets PRO
version: '3.2'
services:
inlets:
image: inlets/inlets-pro:0.6.1
restart: always
command: [
"client",
"--connect", "${INLETS_REMOTE}",
"--token", "${INLETS_TOKEN}",
"--license", "${INLETS_LICENSE}"
"--tcp-ports", "80,443"
traefik:
container_name: traefik
image: traefik:v2.2
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entryPoints.web.address=:80"
- "--entryPoints.websecure.address=:443"
- "--certificatesResolvers.le.acme.email=<your email address>"
- "--certificatesResolvers.le.acme.storage=/traefik/acme.json"
- "--certificatesResolvers.le.acme.tlsChallenge=true"
- "--certificatesResolvers.le.acme.httpChallenge=true"
- "--certificatesResolvers.le.acme.httpChallenge.entryPoint=web"
restart: always
ports:
- 80:80
- 443:443
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /var/www/ghost/acme:/traefik
labels:
# Redirect all HTTP to HTTPS permanently
- traefik.http.routers.http_catchall.rule=HostRegexp(`{any:.+}`)
- traefik.http.routers.http_catchall.entrypoints=web
- traefik.http.routers.http_catchall.middlewares=https_redirect
- traefik.http.middlewares.https_redirect.redirectscheme.scheme=https
- traefik.http.middlewares.https_redirect.redirectscheme.permanent=true
ghost:
image: ghost:3.14.0-alpine
restart: always
volumes:
- "/opt/ghost/content:/var/lib/ghost/content"
environment:
url: "${GHOST_URL}"
labels:
- traefik.http.routers.ghost.rule=Host(`${GHOST_DOMAIN}`)
- traefik.http.routers.ghost.tls=true
- traefik.http.routers.ghost.tls.certresolver=le
- traefik.http.middlewares.ghost.compress=true
- traefik.http.routers.ghost.middlewares=ghost@docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment