# =====================================================================
# Blazor SaaS CRM - Docker Compose untuk Portainer Stack
# =====================================================================
# ASP.NET Core Blazor .NET 10 - Multi-tenant SaaS CRM
# Database: Blazor-SaaS-CRM
# =====================================================================

services:
  blazor-saas-crm:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: blazor-saas-crm
    restart: unless-stopped
    expose:
      - 8080
    networks:
      - indotalent-network
    environment:
      - ASPNETCORE_ENVIRONMENT=Production
      - ASPNETCORE_URLS=http://+:8080
      - DatabaseSettings__MsSQL__ConnectionString=Server=mssql,1433;Database=Blazor-SaaS-CRM;User Id=sa;Password=nw9703AZz6YmgB@G;TrustServerCertificate=True;
      - BackgroundJobSettings__Hangfire__ConnectionString=Server=mssql,1433;Database=Blazor-SaaS-CRM-Hangfire;User Id=sa;Password=nw9703AZz6YmgB@G;TrustServerCertificate=True;
      - EmailSettings__Smtp__Host=smtp.gmail.com
      - EmailSettings__Smtp__Port=465
      - EmailSettings__Smtp__UserName=go2ismail@gmail.com
      - EmailSettings__Smtp__Password=lrbi cooi gcnt oquw
      - EmailSettings__Smtp__FromAddress=go2ismail@gmail.com
    # RESOURCE LIMITS
    mem_limit: 512m
    mem_reservation: 256m
    cpus: '0.5'
    labels:
      - "indotalent.service=blazor-saas-crm"
      - "indotalent.description=Blazor SaaS CRM - Multi-tenant SaaS"

networks:
  indotalent-network:
    external: true
    name: indotalent-network