version: "2" services: flask: image: flask container_name: flask build: context: ./api dockerfile: Dockerfile ports: - "5000:5000" volumes: - .:/code networks: static-network: ipv4_address: 172.20.128.2 webapp: image: webapp container_name: webapp build: context: ./github-users-web dockerfile: Dockerfile ports: - "3005:3005" networks: static-network: ipv4_address: 172.20.128.3 depends_on: - flask healthapp: image: healthapp container_name: healthapp build: context: ./health-app dockerfile: Dockerfile ports: - "3006:3006" networks: static-network: ipv4_address: 172.20.128.4 depends_on: - flask - webapp networks: static-network: ipam: config: - subnet: 172.20.0.0/16 #docker-compose v3+ do not use ip_range ip_range: 172.28.5.0/24