Files
admintemplate-mvc/docker-compose.yml
T
2026-07-21 09:47:16 +07:00

42 lines
1.7 KiB
YAML

# =====================================================================
# Admin Template MVC - Docker Compose untuk Portainer Stack
# =====================================================================
# ASP.NET Core MVC .NET 10
# Routing via Nginx Proxy Manager (container name)
# Tidak perlu expose port ke host!
# =====================================================================
services:
admintemplate-mvc:
build:
context: .
dockerfile: Dockerfile
container_name: admintemplate-mvc
restart: unless-stopped
# TIDAK PERLU ports: - routing via NPM ke container name
expose:
- 8080
networks:
- indotalent-network
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:8080
# Database connection strings (gunakan internal hostnames)
- ConnectionStrings__PostgreSQL=Host=postgres;Port=5432;Database=indotalent;Username=indotalent_admin;Password=nw9703AZz6YmgB@G
- ConnectionStrings__MSSQL=Server=mssql,1433;Database=indotalent;User Id=sa;Password=nw9703AZz6YmgB@G;TrustServerCertificate=True
# =================================================================
# RESOURCE LIMITS (Standalone Docker Compose)
# =================================================================
# Membatasi CPU dan Memory agar tidak membebani server
# Minimal 256MB, Max 512MB (2x lipat)
mem_limit: 512m # Max 512 MB RAM
mem_reservation: 256m # Minimal 256 MB RAM
cpus: '0.5' # Max 50% dari 1 CPU core
labels:
- "indotalent.service=admintemplate-mvc"
- "indotalent.description=Admin Template ASP.NET Core MVC .NET 10"
networks:
indotalent-network:
external: true
name: indotalent-network