-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
58 lines (54 loc) · 1.95 KB
/
docker-compose.prod.yml
File metadata and controls
58 lines (54 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# -----------------------------------------------------------------------------
# Microsoft Azure Container Registry / Docker Compose Template
# Project: Hardware-Aware Case Conversion Engine
# Component: Production Orchestration & High-Availability Logic
# Documentation: https://github.com/nitishhsinghhh/case-conversion-api
# -----------------------------------------------------------------------------
# VERSION HISTORY
# Version | Date | Author | Description
# --------|------------|--------------|----------------------------------------
# 1.0.0 | 2026-04-21 | Nitish Singh | Initial Release. Hardened security & limits.
# -----------------------------------------------------------------------------
# ARCHITECTURAL STRATEGY:
# * Resource Constraints: CPU/Memory limits enforced to protect host stability.
# * Performance Tuning: DOTNET_gcServer enabled for high-throughput workloads.
# * Resilience: 'Always' restart policy and 'pull_policy' for CD synchronization.
# -----------------------------------------------------------------------------
version: "3.9"
services:
# --- BACKEND: Production-Hardened .NET + C++ Service ---
backend:
image: nitishhsinghhh/case-api:latest
container_name: case-api-prod
pull_policy: always
ports:
- "8080:8080"
environment:
- ASPNETCORE_ENVIRONMENT=Production
- DOTNET_gcServer=1 # Optimizes for multi-processor throughput
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
restart: always
networks:
- case-network
# --- FRONTEND: Optimized NGINX React Bundle ---
frontend:
image: nitishhsinghhh/case-ui:latest
container_name: case-ui-prod
pull_policy: always
ports:
- "80:80"
environment:
- VITE_API_URL=http://localhost:8080
depends_on:
- backend
restart: always
networks:
- case-network
# --- NETWORK INFRASTRUCTURE ---
networks:
case-network:
driver: bridge