From c1a9274f1c5ca234c4d4dd3a9f874c540551ea9b Mon Sep 17 00:00:00 2001 From: komodo Date: Fri, 27 Feb 2026 10:25:41 +0100 Subject: [PATCH] [Komodo] admin: Write Stack File: update compose.yaml --- compose.yaml | 50 ++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/compose.yaml b/compose.yaml index 7a9af3c..4309ea4 100644 --- a/compose.yaml +++ b/compose.yaml @@ -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 \ No newline at end of file