n8n/docker/compose/withPostgres/docker-compose.yml
Iván Ovejero 11617616cd
refactor: Format root-level files (#3858)
*  Create `format.mjs` script

* 👕 Add lint exception

*  Add root formatting to `format` command

* 🎨 Fix glob in `.prettierignore`

* 🚚 Improve naming

* 🎨 Format root-level files

*  Simplify check

*  Add period to extension

*  Locate config

*  Add `ignore` arg

* 🚚 Move `config` and `ignore` after check
2022-08-19 15:34:02 +02:00

49 lines
1.2 KiB
YAML

version: '3.8'
volumes:
db_storage:
n8n_storage:
services:
postgres:
image: postgres:11
restart: always
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
volumes:
- db_storage:/var/lib/postgresql/data
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
n8n:
image: n8nio/n8n
restart: always
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER
- N8N_BASIC_AUTH_PASSWORD
ports:
- 5678:5678
links:
- postgres
volumes:
- n8n_storage:/home/node/
command: /bin/sh -c "n8n start --tunnel"
depends_on:
postgres:
condition: service_healthy