services: postgres: profiles: ["postgres", "all"] image: postgres:16-alpine container_name: nl_sql_postgres environment: POSTGRES_DB: nl_sql_demo POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres ports: - "5433:5432" volumes: - nl_sql_pg_data:/var/lib/postgresql/data - ./scripts/sql/postgres_init.sql:/docker-entrypoint-initdb.d/01_init.sql:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d nl_sql_demo"] interval: 5s timeout: 3s retries: 10 volumes: nl_sql_pg_data: