migrate
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
services:
|
||||
<< service_name >>:
|
||||
image: docker.n8n.io/n8nio/n8n:2.20.0
|
||||
container_name: << container_name >>
|
||||
hostname: << container_hostname >>
|
||||
restart: << restart_policy >>
|
||||
environment:
|
||||
<%- if container_loglevel %>
|
||||
- N8N_LOG_LEVEL=<< container_loglevel >>
|
||||
<%- endif %>
|
||||
<%- if container_timezone %>
|
||||
- GENERIC_TIMEZONE=<< container_timezone >>
|
||||
- TZ=<< container_timezone >>
|
||||
<%- endif %>
|
||||
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
|
||||
- NODE_ENV=production
|
||||
- N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
|
||||
<%- if database_type == 'postgres' %>
|
||||
- DB_TYPE=postgresdb
|
||||
- DB_POSTGRESDB_HOST=<< database_host >>
|
||||
- DB_POSTGRESDB_PORT=<< database_port >>
|
||||
- DB_POSTGRESDB_DATABASE=<< database_name >>
|
||||
- DB_POSTGRESDB_USER=${DATABASE_USER}
|
||||
- DB_POSTGRESDB_PASSWORD=${DATABASE_PASSWORD}
|
||||
<%- endif %>
|
||||
<%- if traefik_enabled %>
|
||||
- N8N_HOST=<< traefik_host >>.<< traefik_domain >>
|
||||
- N8N_PORT=5678
|
||||
<%- if traefik_tls_enabled %>
|
||||
- N8N_PROTOCOL=https
|
||||
- N8N_EDITOR_BASE_URL=https://<< traefik_host >>.<< traefik_domain >>
|
||||
- WEBHOOK_URL=https://<< traefik_host >>.<< traefik_domain >>/
|
||||
<%- else %>
|
||||
- N8N_PROTOCOL=http
|
||||
- N8N_EDITOR_BASE_URL=http://<< traefik_host >>.<< traefik_domain >>
|
||||
- WEBHOOK_URL=http://<< traefik_host >>.<< traefik_domain >>/
|
||||
<%- endif %>
|
||||
- N8N_PROXY_HOPS=1
|
||||
<%- endif %>
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- << service_name >>_data:/home/node/.n8n
|
||||
<%- if traefik_enabled %>
|
||||
networks:
|
||||
- << traefik_network >>
|
||||
<%- endif %>
|
||||
<%- if not traefik_enabled %>
|
||||
ports:
|
||||
- "<< ports_http >>:5678"
|
||||
<%- endif %>
|
||||
<%- if traefik_enabled %>
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.docker.network=<< traefik_network >>
|
||||
- traefik.http.services.<< service_name >>-web.loadbalancer.server.port=5678
|
||||
- traefik.http.routers.<< service_name >>-http.service=<< service_name >>-web
|
||||
- traefik.http.routers.<< service_name >>-http.rule=Host(`<< traefik_host >>.<< traefik_domain >>`)
|
||||
- traefik.http.routers.<< service_name >>-http.entrypoints=<< traefik_entrypoint >>
|
||||
<%- if traefik_tls_enabled %>
|
||||
- traefik.http.routers.<< service_name >>-https.service=<< service_name >>-web
|
||||
- traefik.http.routers.<< service_name >>-https.rule=Host(`<< traefik_host >>.<< traefik_domain >>`)
|
||||
- traefik.http.routers.<< service_name >>-https.entrypoints=<< traefik_tls_entrypoint >>
|
||||
- traefik.http.routers.<< service_name >>-https.tls=true
|
||||
- traefik.http.routers.<< service_name >>-https.tls.certresolver=<< traefik_tls_certresolver >>
|
||||
<%- endif %>
|
||||
<%- endif %>
|
||||
|
||||
volumes:
|
||||
<< service_name >>_data:
|
||||
driver: local
|
||||
|
||||
<%- if traefik_enabled %>
|
||||
networks:
|
||||
<< traefik_network >>:
|
||||
external: true
|
||||
<%- endif %>
|
||||
Reference in New Issue
Block a user