n8n in queue mode with Redis, PostgreSQL persistence, and proper process supervision — the boring, reliable setup that survives restarts and workload spikes. The automation layer behind several of my
When one node is not enough: SeaweedFS provides distributed, replicated S3 storage with a master/filer/volume architecture — ideal as a large-scale backup target on commodity hardware.
The two services almost every application needs, tuned instead of defaulted: production-tuned PostgreSQL (shared buffers, WAL compression), Redis with AOF + RDB persistence, and a scheduled backup job with retention.
A deployment guide with working examples — not a downloadable product. Everything below is the actual configuration I use, abridged to the parts that matter.
services:
postgres:
image: postgres:${POSTGRES_VERSION:-16-alpine}
container_name: db-postgres
restart: unless-stopped
volumes:
- postgres_data:/var/lib/postgresql/data
- ./config/postgres/postgresql.conf:/etc/postgresql/postgresql.conf:ro
- ./config/postgres/init:/docker-entrypoint-initdb.d:ro
- backup_data:/backups
environment:
- POSTGRES_USER=${POSTGRES_USER:-app}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
- POSTGRES_DB=${POSTGRES_DB:-app}
- PGDATA=/var/lib/postgresql/data/pgdata
ports:
- ${POSTGRES_PORT:-5432}:5432
command:
- postgres
- -c
- config_file=/etc/postgresql/postgresql.conf
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${POSTGRES_USER:-app}
interval: 15s
timeout: 5s
retries: 5
networks:
- db_network
redis:
image: redis:${REDIS_VERSION:-7-alpine}
container_name: db-redis
restart: unless-stopped
command:
- redis-server
- --appendonly
- 'yes'
- --appendfsync
- everysec
- --requirepass
- ${REDIS_PASSWORD:?REDIS_PASSWORD is required}
- --maxmemory
- ${REDIS_MAX_MEMORY:-512mb}
- --maxmemory-policy
- allkeys-lru
- --save
- 900 1
- --save
- 300 10
- --save
- 60 10000
volumes:
- redis_data:/data
ports:
- ${REDIS_PORT:-6379}:6379
healthcheck:
test:
- CMD
- redis-cli
- --raw
- incr
- ping
interval: 15s
timeout: 5s
retries: 5
networks:
- db_network
Excerpt — postgres, redis from the compose file. The remaining services (proxies, init jobs, exporters) follow the same pattern and mount their configuration from a config/ directory.
Copy .env.example to .env and at minimum set:
POSTGRES_VERSION=16-alpine
POSTGRES_USER=app
POSTGRES_PASSWORD=change_me
POSTGRES_DB=app
POSTGRES_PORT=5432
PGDATA=/var/lib/postgresql/data/pgdata
.env before the first start — never ship the example valuesA guide, not a product. This page is deployment documentation with working examples — there is no zip, no download, no support contract. You adapt the patterns to your own environment, and you own the result.
Want this running production-grade in your infrastructure instead? Foundation work like this is my standard infrastructure consulting scope — details on the consulting page: €1,000/day, remote or on-site, invoice as usual.