version: "2"

services:

  loadbalancer:
    build: ./loadbalancer
    networks:
      - cloudcms
    depends_on:
      - server1
      - server2
    ports:
      - "80:80"
      - "8085:8085"
    expose:
      - "80"

  server1:
    build: ./server1
    networks:
      - cloudcms
    env_file:
      - ./server1/server.env

  server2:
    build: ./server2
    networks:
      - cloudcms
    env_file:
      - ./server2/server.env

  redis:
    build: ./redis
    networks:
      - cloudcms

networks:
  cloudcms:
    driver: bridge