services: redis: image: 'redislabs/redismod' ports: - '6379:6379' healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 5s retries: 5 web1: build: context: web target: builder restart: on-failure hostname: web1 depends_on: redis: condition: service_healthy web2: build: context: web target: builder restart: on-failure hostname: web2 depends_on: redis: condition: service_healthy proxy: image: nginx volumes: - type: bind source: ./proxy/nginx.conf target: /etc/nginx/conf.d/default.conf read_only: true ports: - '80:80' depends_on: - web1 - web2