27 lines
775 B
YAML
27 lines
775 B
YAML
services:
|
|
app:
|
|
image: registry.home:5000/admin/hello-world:${TAG:-latest}
|
|
restart: unless-stopped
|
|
networks:
|
|
- app-net
|
|
- traefik
|
|
environment:
|
|
- PORT=3000
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.hello.rule=Host(`hello.home`)"
|
|
- "traefik.http.routers.hello.tls.certresolver=letsencrypt"
|
|
- "traefik.http.routers.hello.middlewares=sec-headers@file"
|
|
- "traefik.http.services.hello.loadbalancer.server.port=3000"
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', r => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
networks:
|
|
app-net:
|
|
internal: true
|
|
traefik:
|
|
external: true
|