version: "3" services: postgres: container_name: "postgres" hostname: "postgres" image: postgres environment: - POSTGRES_DB=test - POSTGRES_USER=test - POSTGRES_PASSWORD=test expose: - 5432 redis: container_name: "redis" hostname: "permission_service" image: redis expose: - 6379 wait-for-it-example: depends_on: - postgres - redis build: . command: wait-for-them -t 30000 postgres:5432 redis:6379 -- true