new services
hello-world / hello (push) Successful in 18s

This commit is contained in:
2026-09-19 04:15:15 -05:00
parent 05cee81045
commit 7a349036c5
6 changed files with 125 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# Copy to .env and fill in secrets before `docker compose up -d`
POSTGRES_USER=n8n
POSTGRES_PASSWORD=change-me
POSTGRES_DB=n8n
# Public hostname / protocol used to access n8n (no port suffix needed when behind a reverse proxy)
N8N_HOST=localhost
N8N_PROTOCOL=http
N8N_PORT=5678
WEBHOOK_URL=http://localhost:5678/
TZ=UTC
+41
View File
@@ -0,0 +1,41 @@
services:
postgres:
image: postgres:16
container_name: n8n-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-n8n}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
POSTGRES_DB: ${POSTGRES_DB:-n8n}
volumes:
- /data/n8n/postgres:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}']
interval: 10s
timeout: 5s
retries: 5
n8n:
image: n8nio/n8n:latest
container_name: n8n
restart: unless-stopped
ports:
- '${N8N_PORT:-5678}:5678'
environment:
DB_TYPE: postgresdb
DB_POSTGRESDB_HOST: postgres
DB_POSTGRESDB_PORT: '5432'
DB_POSTGRESDB_DATABASE: ${POSTGRES_DB:-n8n}
DB_POSTGRESDB_USER: ${POSTGRES_USER:-n8n}
DB_POSTGRESDB_PASSWORD: ${POSTGRES_PASSWORD:?set POSTGRES_PASSWORD in .env}
N8N_HOST: ${N8N_HOST:-localhost}
N8N_PORT: '5678'
N8N_PROTOCOL: ${N8N_PROTOCOL:-http}
WEBHOOK_URL: ${WEBHOOK_URL:-}
GENERIC_TIMEZONE: ${TZ:-UTC}
TZ: ${TZ:-UTC}
volumes:
- /data/n8n/files:/home/node/.n8n
depends_on:
postgres:
condition: service_healthy