# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: '2'
services:
  apache:
    build: apache-proxy
    ports:
      - "80:80"
      - "443:443"
    logging:
      options:
        max-size: "1m"
        max-file: "5"
    links:
      - demo-5-release
#      - demo-5-staging
      - demo-5-snapshot
      - demo-4-release
#      - demo-4-staging
      - demo-4-snapshot
      - demo-3-release
#      - demo-2-release
#      - demo-2-staging
      - demo-2-snapshot
      - demo-1-5-release
#      - demo-1-5-staging
#      - demo-1-5-snapshot
      - demo-1-0-release
#      - demo-1-0-staging
#      - demo-1-0-snapshot
    depends_on:
      - demo-5-release
#      - demo-5-staging
      - demo-5-snapshot
      - demo-4-release
#      - demo-4-staging
      - demo-4-snapshot
      - demo-3-release
#      - demo-2-release
#      - demo-2-staging
      - demo-2-snapshot
      - demo-1-5-release
      - demo-1-0-release
  demo-5-release:
    build: tomcat
    environment:
      - TOBAGO_VERSION=5.0.0
      - CONTEXT_PATH=demo-5-release
    volumes:
      - ~/tobago-vm/artifacts:/opt/docker/artifacts
    ports:
      - "8500:8080"
    logging:
      options:
        max-size: "1m"
        max-file: "5"
#  demo-5-staging:
#    build: tomcat
#    environment:
#      - TOBAGO_VERSION=5.0.0
#      - STAGING_NUMBER=1196
#      - CONTEXT_PATH=demo-5-staging
#    volumes:
#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
#    ports:
#      - "8501:8080"
#    logging:
#      options:
#        max-size: "1m"
#        max-file: "5"
  demo-5-snapshot:
    build: tomcat
    environment:
      - TOBAGO_VERSION=5.1.0-SNAPSHOT
      - CONTEXT_PATH=demo-5-snapshot
    volumes:
      - ~/tobago-vm/artifacts:/opt/docker/artifacts
    ports:
      - "8502:8080"
    logging:
      options:
        max-size: "1m"
        max-file: "5"
  demo-4-release:
    build: tomcat
    environment:
      - TOBAGO_VERSION=4.5.4
      - CONTEXT_PATH=demo-4-release
    volumes:
      - ~/tobago-vm/artifacts:/opt/docker/artifacts
    ports:
      - "8400:8080"
    logging:
      options:
        max-size: "1m"
        max-file: "5"
#  demo-4-staging:
#    build: tomcat
#    environment:
#      - TOBAGO_VERSION=4.5.4
#      - STAGING_NUMBER=1191
#      - CONTEXT_PATH=demo-4-staging
#    volumes:
#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
#    ports:
#      - "8401:8080"
#    logging:
#      options:
#        max-size: "1m"
#        max-file: "5"
  demo-4-snapshot:
    build: tomcat
    environment:
      - TOBAGO_VERSION=4.5.5-SNAPSHOT
      - CONTEXT_PATH=demo-4-snapshot
    volumes:
      - ~/tobago-vm/artifacts:/opt/docker/artifacts
    ports:
      - "8402:8080"
    logging:
      options:
        max-size: "1m"
        max-file: "5"
  demo-3-release:
    build: tomcat
    environment:
      - TOBAGO_VERSION=3.1.1
      - CONTEXT_PATH=demo-3-release
    volumes:
      - ~/tobago-vm/artifacts:/opt/docker/artifacts
    ports:
      - "8300:8080"
    logging:
      options:
        max-size: "1m"
        max-file: "5"
#  demo-2-release:
#    build: tomcat
#    environment:
#      - TOBAGO_VERSION=2.4.4
#      - CONTEXT_PATH=demo-2-release
#    volumes:
#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
#    ports:
#      - "8200:8080"
#    logging:
#      options:
#        max-size: "1m"
#        max-file: "5"
#  demo-2-staging:
#    build: tomcat
#    environment:
#      - TOBAGO_VERSION=2.4.4
#      - STAGING_NUMBER=1179
#      - CONTEXT_PATH=demo-2-staging
#    volumes:
#      - ~/tobago-vm/artifacts:/opt/docker/artifacts
#    ports:
#      - "8201:8080"
#    logging:
#      options:
#        max-size: "1m"
#        max-file: "5"
  demo-2-snapshot:
    build: tomcat
    environment:
      - TOBAGO_VERSION=2.4.5-SNAPSHOT
      - CONTEXT_PATH=demo-2-snapshot
    volumes:
      - ~/tobago-vm/artifacts:/opt/docker/artifacts
    ports:
      - "8202:8080"
    logging:
      options:
        max-size: "1m"
        max-file: "5"
  demo-1-5-release:
    build: tomcat
    environment:
      - TOBAGO_VERSION=1.5.13
      - CONTEXT_PATH=demo-1-5-release
    volumes:
      - ~/tobago-vm/artifacts:/opt/docker/artifacts
    ports:
      - "8150:8080"
    logging:
      options:
        max-size: "1m"
        max-file: "5"
  demo-1-0-release:
    build: tomcat
    environment:
      - TOBAGO_VERSION=1.0.42
      - CONTEXT_PATH=demo-1-0-release
    volumes:
      - ~/tobago-vm/artifacts:/opt/docker/artifacts
    ports:
      - "8100:8080"
    logging:
      options:
        max-size: "1m"
        max-file: "5"
