[Komodo] admin: Write Stack File: update compose.yaml

This commit is contained in:
komodo 2026-02-27 10:25:41 +01:00
parent d362a24817
commit c1a9274f1c

View file

@ -1,16 +1,38 @@
## Add your compose file here
services:
hello_world:
image: hello-world
# networks:
# - default
# ports:
# - 3000:3000
# volumes:
# - data:/data
postgres:
image: postgres:16
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=n8n
- POSTGRES_NON_ROOT_USER=n8n
- POSTGRES_NON_ROOT_PASSWORD=n8n
volumes:
- /app-config/n8n/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
# networks:
# default: {}
# volumes:
# data:
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=n8n
- DB_POSTGRESDB_USER=n8n
- DB_POSTGRESDB_PASSWORD=n8n
ports:
- 5678:5678
links:
- postgres
volumes:
- /app-config/n8n/n8n_storage:/home/node/.n8n
depends_on:
postgres:
condition: service_healthy