chore: update Docker Compose configuration

- Use postgres:18-alpine image

- Update environment variable format

- Rename volume from pgdata to postgres_data

- Increase healthcheck interval to 10s
This commit is contained in:
2026-04-02 03:49:38 +08:00
parent 341315a01b
commit c20cf02d9f
+9 -7
View File
@@ -5,23 +5,25 @@ services:
db: db:
condition: service_healthy 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
db: db:
image: postgres:18 image: postgres:18-alpine
# ports:
# - "5432:5432"
volumes: volumes:
- pgdata:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql
environment: environment:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres POSTGRES_DB: postgres
healthcheck: healthcheck:
test: [ 'CMD', 'pg_isready', '-U', 'postgres' ] test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 5s interval: 10s
timeout: 5s timeout: 5s
retries: 5 retries: 5
volumes: volumes:
pgdata: postgres_data: