From 4d8d3be954fdf85b9e340382b32c10c9d5deba3e Mon Sep 17 00:00:00 2001 From: Derek Cooper Date: Sat, 16 May 2026 00:28:26 -0700 Subject: [PATCH] created n8n --- n8n/.env.example | 22 +++++++++++++++++++++ n8n/docker-compose-volume.yaml | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 n8n/.env.example create mode 100644 n8n/docker-compose-volume.yaml diff --git a/n8n/.env.example b/n8n/.env.example new file mode 100644 index 0000000..6142cc8 --- /dev/null +++ b/n8n/.env.example @@ -0,0 +1,22 @@ +# n8n Docker Compose Environment Variables + +# n8n application image version (e.g. 1.47.1, or "latest") +N8N_APP_VERSION=latest + +# PostgreSQL image version +N8N_DB_VERSION=16 + +# Timezone for the n8n container (IANA format) +N8N_TZ=America/Chicago + +# Password for the PostgreSQL n8n user (used by both app and db services) +N8N_DB_PASSWORD=changeme + +# Encryption key used to encrypt saved credentials — generate with: openssl rand -hex 32 +N8N_ENCRYPTION_KEY=changeme_random_string + +# Public-facing URL n8n uses to construct webhook URLs (include trailing path if needed) +N8N_URL=https://n8n.yourdomain.com + +# Host port to expose the n8n web UI on +N8N_PORT=5678 diff --git a/n8n/docker-compose-volume.yaml b/n8n/docker-compose-volume.yaml new file mode 100644 index 0000000..3003876 --- /dev/null +++ b/n8n/docker-compose-volume.yaml @@ -0,0 +1,36 @@ +services: + app: + image: n8nio/n8n:${N8N_APP_VERSION:-latest} + container_name: n8n-app + environment: + - TZ=${N8N_TZ:-America/Los_Angeles} + - DB_TYPE=postgresdb + - DB_POSTGRESDB_HOST=n8n-db + - DB_POSTGRESDB_PORT=5432 + - DB_POSTGRESDB_DATABASE=n8n + - DB_POSTGRESDB_USER=n8n + - DB_POSTGRESDB_PASSWORD=${N8N_DB_PASSWORD:-changeme} + - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY:-changeme_random_string} + - WEBHOOK_URL=${N8N_URL:-https://n8n.yourdomain.com} + volumes: + - n8n-app:/home/node/.n8n + ports: + - ${N8N_PORT:-5678}:5678 + depends_on: + - db + restart: unless-stopped + + db: + image: postgres:${N8N_DB_VERSION:-16} + container_name: n8n-db + environment: + - POSTGRES_DB=n8n + - POSTGRES_USER=n8n + - POSTGRES_PASSWORD=${N8N_DB_PASSWORD:-changeme} + volumes: + - n8n-db:/var/lib/postgresql/data + restart: unless-stopped + +volumes: + n8n-app: + n8n-db: \ No newline at end of file