postgres
services:
db:
container_name: nome-univoco
image: immagine desiderata (tipo: postgres:16-alpine)
ports:
- "60002:5432"
# oppure, se non รจ necessario l'accesso esterno
expose:
- "5432/tcp"
volumes:
- ./db-data:/var/lib/postgresql/data
restart: always
environment:
- "TZ=Europe/Rome"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: "10s"
timeout: "30s"
retries: 5
start_period: "20s"
No Comments