diff options
| author | IwanIDev <iwan@iwani.dev> | 2026-03-20 13:52:35 +0000 |
|---|---|---|
| committer | IwanIDev <iwan@iwani.dev> | 2026-03-20 13:52:35 +0000 |
| commit | d7475b2bc3edf0027e0fa57e3997c084c36a1b74 (patch) | |
| tree | 53f6da45dbf965259f29775160a2e7fac8e42903 /docker-stack.yml | |
| parent | 719a1e81d5af5c872f79f11f462e4b30211f80b7 (diff) | |
Add Traefik configuration and environment variables for Docker deployment
Diffstat (limited to 'docker-stack.yml')
| -rw-r--r-- | docker-stack.yml | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/docker-stack.yml b/docker-stack.yml index 6512e2e..b747839 100644 --- a/docker-stack.yml +++ b/docker-stack.yml @@ -3,17 +3,12 @@ version: '3.8' services: web: image: ${IMAGE_NAME} - ports: - - target: 80 - published: 8280 - protocol: tcp - mode: host deploy: replicas: 1 update_config: parallelism: 1 delay: 10s - order: start-first + order: stop-first restart_policy: condition: on-failure delay: 5s @@ -21,8 +16,14 @@ services: window: 120s labels: - "app=vite-portfolio" + - "traefik.enable=true" + - "traefik.docker.network=${TRAEFIK_NETWORK:-traefik-public}" + - "traefik.http.routers.vite-portfolio.rule=Host(`${PORTFOLIO_HOST:-localhost}`)" + - "traefik.http.routers.vite-portfolio.entrypoints=${TRAEFIK_ENTRYPOINTS:-web}" + - "traefik.http.services.vite-portfolio.loadbalancer.server.port=80" networks: - portfolio-network + - traefik-public drupal: image: drupal:10-apache @@ -77,3 +78,6 @@ volumes: networks: portfolio-network: driver: overlay + traefik-public: + external: true + name: ${TRAEFIK_NETWORK:-traefik-public} |
