services:
  n8n:
    image: n8nio/n8n:1.123.5
    container_name: ${CONTAINER_NAME}
    restart: always
    networks:
      - icontainer-network
    ports:
      - ${PANEL_APP_PORT_HTTP}:5678
    volumes:
      - ./data:/home/node/.n8n
    environment:
      N8N_SECURE_COOKIE: false
      GENERIC_TIMEZONE: ${TZ:-America/Sao_Paulo}
      TZ: ${TZ}
      N8N_DEFAULT_LOCALE: ${LOCALE}
      N8N_METRICS: ${HAS_METRICS:-false}
      WEBHOOK_URL: ${APP_PROTOCOL:-http}://${APP_DOMAIN}
      N8N_PROTOCOL: ${APP_PROTOCOL:-http}
      N8N_WEBHOOK_URL: ${APP_PROTOCOL:-http}://${APP_DOMAIN}/
      N8N_EDITOR_BASE_URL: ${APP_PROTOCOL:-http}://${APP_DOMAIN}/
    labels:
      createdBy: "icontainer"
networks:
  icontainer-network:
    external: true