services: postgres_db: image: postgres:16.1-alpine3.19 container_name: bolt_postgresql_db healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 ports: - "4001:5432" environment: - POSTGRES_DB=test_db - POSTGRES_USER=test_user - POSTGRES_PASSWORD=testpassword volumes: - postgres_db_volume:/var/lib/postgresql/data volumes: postgres_db_volume: name: postgres-db-volume