23 lines
602 B
YAML
23 lines
602 B
YAML
|
services:
|
||
|
postgres:
|
||
|
image: postgres:15-alpine
|
||
|
container_name: postgres
|
||
|
environment:
|
||
|
POSTGRES_HOST: postgres
|
||
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
||
|
POSTGRES_DB: ${POSTGRES_DB:-postgres}
|
||
|
ports:
|
||
|
- 5432:5432
|
||
|
volumes:
|
||
|
- postgres_data:/var/lib/postgresql/data
|
||
|
restart: unless-stopped
|
||
|
#healthcheck:
|
||
|
# test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||
|
# interval: 5s
|
||
|
# timeout: 5s
|
||
|
# retries: 5
|
||
|
|
||
|
volumes:
|
||
|
postgres_data: # Named volume for data persistence
|