From 5de4d5f94022b4e4a665cc3849c3c8397580d937 Mon Sep 17 00:00:00 2001 From: imbytecat Date: Thu, 2 Apr 2026 02:45:00 +0800 Subject: [PATCH] chore: upgrade PostgreSQL to v18 and restructure compose.yaml --- compose.yaml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/compose.yaml b/compose.yaml index a22d476..9056072 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,26 +1,24 @@ services: app: build: . - ports: - - '3000:3000' - environment: - DATABASE_URL: postgres://postgres:postgres@db:5432/postgres depends_on: db: condition: service_healthy + ports: + - '3000:3000' + environment: + - DATABASE_URL=postgres://postgres:postgres@db:5432/postgres 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