version: '3.8' services: postgres: image: postgres:latest environment: POSTGRES_USER: myuser POSTGRES_PASSWORD: mypassword POSTGRES_DB: mydatabase ports: - "5432:5432" volumes: - ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 opaleye: depends_on: postgres: condition: service_healthy build: . environment: POSTGRES_HOST: postgres