45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
services:
|
|
n8n:
|
|
image: n8nio/n8n:latest
|
|
networks:
|
|
- homelab
|
|
environment:
|
|
- N8N_HOST=n8n.bitfrost.me
|
|
- N8N_PORT=5678
|
|
- N8N_PROTOCOL=https
|
|
- N8N_RUNNERS_ENABLED=true
|
|
- WEBHOOK_URL=https://n8n.bitfrost.me/
|
|
- TZ=America/New_York
|
|
volumes:
|
|
- /home/doc/projects/swarm-data/appdata/n8n:/home/node/.n8n
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
healthcheck:
|
|
test: [ "CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5678/healthz" ]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
deploy:
|
|
replicas: 1
|
|
restart_policy:
|
|
condition: on-failure
|
|
delay: 5s
|
|
max_attempts: 3
|
|
resources:
|
|
limits:
|
|
memory: 2G
|
|
reservations:
|
|
memory: 512M
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.swarm.network=homelab"
|
|
- "traefik.http.routers.n8n.rule=Host(`n8n.frostlabs.me`)"
|
|
- "traefik.http.routers.n8n.entrypoints=websecure"
|
|
- "traefik.http.routers.n8n.tls.certresolver=cloudflare"
|
|
- "traefik.http.routers.n8n.service=n8n"
|
|
- "traefik.http.services.n8n.loadbalancer.server.port=5678"
|
|
|
|
networks:
|
|
homelab:
|
|
external: true
|