version: "3.7"
services:

  addin:
    build: .
    container_name: addin
    networks:
      - sendsteps
    volumes:
      # Re-use local composer cache via host-volume
      - ~/.composer-docker/cache:/root/.composer/cache:delegated
      # Mount source-code for development
      - ./:/app
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.addin.rule=Host(`plugin.sendsteps.localhost`)"
      - "traefik.http.routers.addin.entrypoints=http"
      - "traefik.http.services.addin.loadbalancer.server.port=80"
      - "traefik.docker.network=sendsteps"

  composer:
    restart: 'no'
    image: composer/composer:latest
    networks:
      - sendsteps
    command: install
    volumes:
      - .:/app

networks:
  sendsteps:
    external: true
