chore: upgrade PostgreSQL to v18 and restructure compose.yaml

This commit is contained in:
2026-04-02 03:43:37 +08:00
parent 77b3484415
commit 341315a01b
+6 -8
View File
@@ -1,24 +1,22 @@
services: services:
app: app:
build: . build: .
depends_on:
db:
condition: service_healthy
ports: ports:
- '3000:3000' - '3000:3000'
environment: environment:
DATABASE_URL: postgres://postgres:postgres@db:5432/postgres DATABASE_URL: postgres://postgres:postgres@db:5432/postgres
depends_on:
db:
condition: service_healthy
db: db:
image: postgres:17-alpine image: postgres:18
# ports: volumes:
# - '5432:5432' - pgdata:/var/lib/postgresql/data
environment: environment:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres POSTGRES_DB: postgres
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck: healthcheck:
test: [ 'CMD', 'pg_isready', '-U', 'postgres' ] test: [ 'CMD', 'pg_isready', '-U', 'postgres' ]
interval: 5s interval: 5s