From 341315a01bf09cfbd328631c2c02f6ae5b177073 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Thu, 2 Apr 2026 03:43:37 +0800 Subject: [PATCH] chore: upgrade PostgreSQL to v18 and restructure compose.yaml --- compose.yaml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/compose.yaml b/compose.yaml index a22d476..bfad65b 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,26 +1,24 @@ services: app: build: . + depends_on: + db: + condition: service_healthy ports: - '3000:3000' environment: DATABASE_URL: postgres://postgres:postgres@db:5432/postgres - depends_on: - db: - condition: service_healthy db: - image: postgres:17-alpine - # ports: - # - '5432:5432' + image: postgres:18 + volumes: + - pgdata:/var/lib/postgresql/data environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres - volumes: - - pgdata:/var/lib/postgresql/data healthcheck: - test: ['CMD', 'pg_isready', '-U', 'postgres'] + test: [ 'CMD', 'pg_isready', '-U', 'postgres' ] interval: 5s timeout: 5s retries: 5