version: '3.7'
services:
  app_proxy:
    environment:
      APP_HOST: cpn-n8n_server_1
      APP_PORT: 5678
      PROXY_AUTH_WHITELIST: /webhook-test/*,/webhook/*
    container_name: cpn-n8n_app_proxy_1
  server:
    image: >-
      n8nio/n8n:latest
    restart: on-failure
    volumes:
      - ${APP_DATA_DIR}/data:/home/node/.n8n
    stop_grace_period: 1m
    environment:
      - PUID=1000
      - PGID=1000
      - N8N_HOST=$DEVICE_DOMAIN_NAME
      - N8N_SECURE_COOKIE=false
      - N8N_DIAGNOSTICS_ENABLED=false
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
      - N8N_RUNNERS_ENABLED=true
    container_name: cpn-n8n_server_1