mirror of
https://github.com/esauflores/databases.git
synced 2026-03-09 06:30:34 +00:00
21 lines
557 B
YAML
21 lines
557 B
YAML
services:
|
|
postgres:
|
|
# run `just build postgres` first
|
|
build: database-postgres:latest
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
POSTGRES_DB: ${POSTGRES_DB:-postgres}
|
|
POSTGRES_PORT: ${POSTGRES_PORT:-5432}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
postgres_data:
|