services: db: image: postgres:14 restart: unless-stopped container_name: n8n_db networks: - internal volumes: - {{ server.work_dir }}/n8n/db:/var/lib/postgresql/data environment: - POSTGRES_PASSWORD=n8n - POSTGRES_DB=n8n - POSTGRES_USER=n8n logging: driver: loki options: loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push" mode: non-blocking n8n: image: n8nio/n8n restart: unless-stopped container_name: n8n networks: - internal - proxy volumes: - {{ server.work_dir }}/n8n/base:/home/node/.n8n labels: - "traefik.enable=true" - "traefik.http.routers.n8n-secure.entrypoints=https" - "traefik.http.routers.n8n-secure.rule=Host(`n8n.{{ server.domain }}`)" - "traefik.http.routers.n8n-secure.tls=true" - "traefik.http.routers.n8n-secure.tls.certresolver=sslResolver" # - "traefik.http.routers.whoami-secure.service=whoami" # - "traefik.http.services.whoami.loadbalancer.server.port=9002" - "traefik.http.routers.n8n-secure.middlewares=private-network@file" - "traefik.docker.network=proxy" environment: - DB_TYPE=postgresdb - DB_POSTGRESDB_PORT=5432 - DB_POSTGRESDB_HOST=db - DB_POSTGRESDB_DATABASE=n8n - DB_POSTGRESDB_USER=n8n - DB_POSTGRESDB_PASSWORD=n8n logging: driver: loki options: loki-url: "https://lokidoki:vEGH5Z5siWgcDkNknvCVzPCyqhHSBJCBjeBRZJvxUP8SdgfxJ6AqCGutCWugGsx5@loki.mrdev023.fr/loki/api/v1/push" mode: non-blocking networks: internal: proxy: external: true