post-app-website-new/docker-compose.yml

27 lines
981 B
YAML

services:
post-app-prod:
build: .
restart: unless-stopped
labels:
- "traefik.enable=true"
# Main domain
- "traefik.http.routers.post-app.rule=Host(`post-appitalism.app`) || Host(`www.post-appitalism.app`)"
- "traefik.http.routers.post-app.entrypoints=web"
- "traefik.http.services.post-app.loadbalancer.server.port=80"
# Redirect www to non-www
- "traefik.http.middlewares.post-app-redirect.redirectregex.regex=^https?://www\\.post-appitalism\\.app/(.*)"
- "traefik.http.middlewares.post-app-redirect.redirectregex.replacement=https://post-appitalism.app/$${1}"
- "traefik.http.middlewares.post-app-redirect.redirectregex.permanent=true"
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:80/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 15s
networks:
- traefik-public
networks:
traefik-public:
external: true