Files
iac/docker/postgres/compose.yaml
T

24 lines
455 B
YAML

services:
postgres:
image: postgres:18
restart: unless-stopped
ports:
- 5432:5432
volumes:
- ./volumes/data:/var/lib/postgresql
environment:
TZ: Asia/Shanghai
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
healthcheck:
test:
- CMD-SHELL
- pg_isready -U postgres
interval: 1s
timeout: 5s
retries: 10
networks:
default:
name: db