39749c61c1
- Rewrite Dockerfile: node:22-alpine build + runtime, copy .output/, node server - Add .dockerignore excluding node_modules, .nuxt, .output, src, .git, .planning - Update docker-compose loadbalancer port from 80 to 3000 - Add SMTP and GA4 environment variables to docker-compose Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
40 lines
1.7 KiB
YAML
40 lines
1.7 KiB
YAML
services:
|
|
portfolio:
|
|
image: portfolio
|
|
container_name: portfolio
|
|
restart: unless-stopped
|
|
environment:
|
|
- TZ=Europe/Paris
|
|
- NUXT_SMTP_HOST=${NUXT_SMTP_HOST}
|
|
- NUXT_SMTP_USER=${NUXT_SMTP_USER}
|
|
- NUXT_SMTP_PASS=${NUXT_SMTP_PASS}
|
|
- NUXT_SMTP_TO=${NUXT_SMTP_TO}
|
|
- NUXT_PUBLIC_GTAG_ID=${NUXT_PUBLIC_GTAG_ID}
|
|
networks:
|
|
- public
|
|
labels:
|
|
- 'traefik.enable=true'
|
|
- 'com.centurylinklabs.watchtower.enable=false'
|
|
- 'traefik.http.services.portfolio.loadbalancer.server.port=3000'
|
|
# Main router (non-www)
|
|
- 'traefik.http.routers.portfolio.rule=Host(`${PORTFOLIO_URL}`)'
|
|
- 'traefik.http.routers.portfolio.entrypoints=websecure'
|
|
- 'traefik.http.routers.portfolio.tls.certresolver=public'
|
|
- 'traefik.http.routers.portfolio.tls.domains[0].main=killiandalcin.fr'
|
|
- 'traefik.http.routers.portfolio.tls.domains[0].sans=*.killiandalcin.fr'
|
|
# WWW redirect router
|
|
- 'traefik.http.routers.portfolio-www-redirect.rule=Host(`${PORTFOLIO_URL_WWW}`)'
|
|
- 'traefik.http.routers.portfolio-www-redirect.entrypoints=websecure'
|
|
- 'traefik.http.routers.portfolio-www-redirect.tls.certresolver=public'
|
|
- 'traefik.http.routers.portfolio-www-redirect.middlewares=www-to-non-www'
|
|
- 'traefik.http.routers.portfolio-www-redirect.service=noop@internal'
|
|
# Redirect middleware
|
|
- 'traefik.http.middlewares.www-to-non-www.redirectregex.regex=^https://www\.(.+)'
|
|
- 'traefik.http.middlewares.www-to-non-www.redirectregex.replacement=https://$${1}'
|
|
- 'traefik.http.middlewares.www-to-non-www.redirectregex.permanent=true'
|
|
|
|
networks:
|
|
public:
|
|
driver: bridge
|
|
external: true
|