version: '3.8' services: # ASP.NET Core Application with HTTPS Support servicehost: build: context: . dockerfile: Dockerfile network: host container_name: gozareshgir-api image: gozareshgir-api # ✅ Run as root to ensure write permissions to bind mounts user: "0:0" # ✅ All environment variables are now in ServiceHost/.env env_file: - .env ports: - "${HTTP_PORT:-5003}:80" - "${HTTPS_PORT:-5004}:443" volumes: # ✅ Bind mounts for production-critical data on Windows host - ./ServiceHost/certs:/app/certs:ro - D:/AppData/Faces:/app/Faces - D:/AppData/Storage:/app/Storage - D:/AppData/Logs:/app/Logs - D:/AppData/InsuranceList:/app/InsuranceList networks: - gozareshgir-network extra_hosts: - "host.docker.internal:host-gateway" healthcheck: test: ["CMD", "curl", "-f", "-k", "https://localhost:443/health", "||", "exit", "1"] interval: 30s timeout: 10s start_period: 40s retries: 3 restart: unless-stopped networks: gozareshgir-network: driver: bridge