# This file is used to run the mailu/setup utility

version: '3.6'

services:
  redis:
    image: redis:alpine

  setup_master:
    image: mailu/setup:master
    env_file: .env
    environment:
      this_version: "master"
    labels:
      - traefik.enable=true
      - traefik.port=80
      - traefik.main.frontend.rule=Host:${HOSTNAME};PathPrefix:/master/
    depends_on:
      - redis

  setup_release:
    image: mailu/setup:${RELEASE}
    env_file: .env
    environment:
      this_version: ${RELEASE}
    labels:
      - traefik.enable=true
      - traefik.port=80
      - traefik.root.frontend.redirect.regex=.*
      - traefik.root.frontend.redirect.replacement=/${RELEASE}/
      - traefik.root.frontend.rule=Host:${HOSTNAME};PathPrefix:/
      - traefik.main.frontend.rule=Host:${HOSTNAME};PathPrefix:/${RELEASE}/
    depends_on:
      - redis

# This file is used to run the mailu/setup utility

version: '3.6'

services:
  redis:
    image: redis:alpine

  setup_master:
    image: mailu/setup:master
    networks:
      - web
    env_file: .env
    environment:
      this_version: "master"
    labels:
      - traefik.enable=true
      - traefik.port=80
      - traefik.main.frontend.rule=Host:${HOSTNAME};PathPrefix:/master/
    depends_on:
      - redis

  setup_release:
    image: mailu/setup:${RELEASE}
    networks:
      - web
    env_file: .env
    environment:
      this_version: ${RELEASE}
    labels:
      - traefik.enable=true
      - traefik.port=80
      - traefik.root.frontend.redirect.regex=.*
      - traefik.root.frontend.redirect.replacement=/${RELEASE}/
      - traefik.root.frontend.rule=Host:${HOSTNAME};PathPrefix:/
      - traefik.main.frontend.rule=Host:${HOSTNAME};PathPrefix:/${RELEASE}/
    depends_on:
      - redis

networks:
  web:
    external: true

Define external web network for Traefik connections
Define external web network for Traefik connections
