version: '3.9' services: postgres: image: postgres:15 volumes: - postgres_data:/var/lib/postgresql/data/ env_file: - .env ports: - '5432:5432' healthcheck: test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ] interval: 10s timeout: 60s retries: 3 start_period: 10s volumes: postgres_data: static_volume: