fix: adapt n8n compose for Coolify (remove Traefik/proxy/mail_internal, add dockerfile_inline)

This commit is contained in:
root
2026-03-23 01:16:09 +00:00
parent f36e537336
commit f7a4c1134a
2 changed files with 20 additions and 54 deletions

View File

@@ -1,6 +1,10 @@
services:
n8n:
image: n8nio/n8n:latest
build:
context: .
dockerfile_inline: |
FROM n8nio/n8n:latest
container_name: n8n
restart: unless-stopped
environment:
@@ -33,33 +37,7 @@ services:
N8N_SMTP_STARTTLS: ${N8N_SMTP_STARTTLS}
networks:
- proxy
- n8n
- mail_internal
labels:
traefik.enable: "true"
traefik.docker.network: "proxy"
# UI (protegida por Authentik)
traefik.http.routers.n8n-ui.rule: "Host(`${N8N_DOMAIN}`)"
traefik.http.routers.n8n-ui.entrypoints: "${TRAEFIK_ENTRYPOINT_SECURE}"
traefik.http.routers.n8n-ui.tls: "true"
traefik.http.routers.n8n-ui.tls.certresolver: "${TRAEFIK_CERTRESOLVER}"
traefik.http.routers.n8n-ui.service: "n8n"
traefik.http.routers.n8n-ui.priority: "10"
# traefik.http.routers.n8n-ui.middlewares: "${TRAEFIK_AUTH_MIDDLEWARE}"
# Webhooks (NO protegidos, para que terceros puedan llamar)
traefik.http.routers.n8n-webhook.rule: "Host(`${N8N_DOMAIN}`) && (PathPrefix(`/webhook`) || PathPrefix(`/webhook-test`))"
traefik.http.routers.n8n-webhook.entrypoints: "${TRAEFIK_ENTRYPOINT_SECURE}"
traefik.http.routers.n8n-webhook.tls: "true"
traefik.http.routers.n8n-webhook.tls.certresolver: "${TRAEFIK_CERTRESOLVER}"
traefik.http.routers.n8n-webhook.service: "n8n"
traefik.http.routers.n8n-webhook.priority: "20"
# Puerto interno de n8n
traefik.http.services.n8n.loadbalancer.server.port: "${N8N_PORT}"
n8n-db:
image: postgres:16
@@ -75,11 +53,5 @@ services:
- n8n
networks:
proxy:
external: true
# authentik_internal:
# driver: bridge
n8n:
driver: bridge
mail_internal:
external: true