N8n Deployed to Production

This commit is contained in:
John
2025-11-14 14:02:06 -05:00
parent 6e57ee18d7
commit 6b059f2eea

49
n8n/stack.yml Normal file
View File

@@ -0,0 +1,49 @@
services:
n8n:
image: n8nio/n8n:latest
networks:
- frostlabs
ports:
- 5678:5678
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/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
placement:
constraints:
- node.labels.task == compute
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
resources:
limits:
memory: 2G
reservations:
memory: 512M
labels:
- traefik.enable=true
- traefik.swarm.network=frostlabs
- traefik.http.routers.n8n.rule=Host(`n8n.bitfrost.me`)
- traefik.http.routers.n8n.entrypoints=websecure
- traefik.http.routers.n8n.tls=true
- traefik.http.routers.n8n.tls.certresolver=cloudflare
- traefik.http.services.n8n.loadbalancer.server.port=5678
networks:
frostlabs:
external: true