n8n Stack: inital config
This commit is contained in:
parent
47256f7211
commit
531b4c316a
2 changed files with 63 additions and 0 deletions
18
Docker/Docker-Compose/n8n/.env.sample
Normal file
18
Docker/Docker-Compose/n8n/.env.sample
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# Loki log monitoring
|
||||||
|
LOKI_URL=
|
||||||
|
|
||||||
|
# Optional timezone to set which gets used by Cron and other scheduling nodes
|
||||||
|
# New York is the default value if not set
|
||||||
|
GENERIC_TIMEZONE=Europe/Stockholm
|
||||||
|
|
||||||
|
# DOMAIN_NAME and SUBDOMAIN together determine where n8n will be reachable from
|
||||||
|
# The top level domain to serve from
|
||||||
|
DOMAIN_NAME=example.com
|
||||||
|
|
||||||
|
# The subdomain to serve from
|
||||||
|
SUBDOMAIN=n8n
|
||||||
|
|
||||||
|
# The databese configuration
|
||||||
|
DB_NAME=n8n
|
||||||
|
DB_USER=n8n
|
||||||
|
DB_PASSWORD=n8n
|
45
Docker/Docker-Compose/n8n/docker-compose.yml
Normal file
45
Docker/Docker-Compose/n8n/docker-compose.yml
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
services:
|
||||||
|
n8n:
|
||||||
|
image: n8nio/n8n
|
||||||
|
ports:
|
||||||
|
- 5678:5678
|
||||||
|
environment:
|
||||||
|
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
|
||||||
|
- N8N_PORT=5678
|
||||||
|
- N8N_PROTOCOL=https
|
||||||
|
- DB_TYPE=postgresdb
|
||||||
|
- DB_POSTGRESDB_HOST=db
|
||||||
|
- DB_POSTGRESDB_PORT=5432
|
||||||
|
- DB_POSTGRESDB_DATABASE=${DB_NAME:-n8n}
|
||||||
|
- DB_POSTGRESDB_USER=${DB_USER:-n8n}
|
||||||
|
- DB_POSTGRESDB_PASSWORD=${DB_PASSWORD:-n8n}
|
||||||
|
- NODE_ENV=production
|
||||||
|
depends_on:
|
||||||
|
db:
|
||||||
|
condition: service_healthy
|
||||||
|
volumes:
|
||||||
|
- ${DATA_PATH:-./Data}/:/home/node/.n8n
|
||||||
|
restart: unless-stopped
|
||||||
|
logging:
|
||||||
|
driver: loki
|
||||||
|
options:
|
||||||
|
loki-url: "${LOKI_URL:-http://localhost:3100/loki/api/v1/push}"
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: postgres:16-alpine
|
||||||
|
volumes:
|
||||||
|
- ${DATABASE_PATH:-./Database}:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=${DB_USER:-n8n}
|
||||||
|
- POSTGRES_PASSWORD=${DB_PASSWORD:-n8n}
|
||||||
|
- POSTGRES_DB={DB_NAME:-n8n}
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
logging:
|
||||||
|
driver: loki
|
||||||
|
options:
|
||||||
|
loki-url: "${LOKI_URL:-http://localhost:3100/loki/api/v1/push}"
|
Loading…
Add table
Add a link
Reference in a new issue