services:
  nginx:
    image: nginx:alpine
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    links:
      - server-john
      - server-paul
      - server-george
      - server-ringo
    ports:
     - "3000:80"

  server-john:
    build: ./server
    links:
      - redis
    expose:
      - "3000"
    environment:
      - NAME=John

  server-paul:
    build: ./server
    links:
      - redis
    expose:
      - "3000"
    environment:
      - NAME=Paul

  server-george:
    build: ./server
    links:
      - redis
    expose:
      - "3000"
    environment:
      - NAME=George

  server-ringo:
    build: ./server
    links:
      - redis
    expose:
      - "3000"
    environment:
      - NAME=Ringo

  client:
    build: ./client
    links:
      - nginx

  redis:
    image: redis:6
    expose:
      - "6379"
