version: "3.8"

services:
  app_tis:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        TENANT: tis
        DIST_DIR: tis

    ports:
      - "8091:8090"
    restart: unless-stopped

  app_default:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        TENANT: default
        DIST_DIR: production

    ports:
      - "8090:8090"
    restart: unless-stopped

    # labels:
    #   - "traefik.enable=true"

    #   # 🌐 Router
    #   - "traefik.http.routers.psp.rule=Host(`your-domain.com`)"
    #   - "traefik.http.routers.psp.entrypoints=websecure"
    #   - "traefik.http.routers.psp.tls=true"

    #   # 🔐 SSL (auto with Traefik)
    #   - "traefik.http.routers.psp.tls.certresolver=letsencrypt"

    #   # ⚡ Service port (IMPORTANT)
    #   - "traefik.http.services.psp.loadbalancer.server.port=80"

    #   # 🚀 Compression at edge (optional)
    #   - "traefik.http.middlewares.compress.compress=true"
    #   - "traefik.http.routers.psp.middlewares=compress@docker"

    networks:
      - web

networks:
  web:
    driver: bridge
