diff --git a/.gitea/workflows/deploy-prod.yml b/.gitea/workflows/deploy-prod.yml index 8a84d994..00364ad7 100644 --- a/.gitea/workflows/deploy-prod.yml +++ b/.gitea/workflows/deploy-prod.yml @@ -215,6 +215,13 @@ jobs: tar -xzf quantengine.tar.gz -C "${TARGET_DIR}" rm -f quantengine.tar.gz + # 배포 구조 정규화 (net10.0 디렉토리가 있으면 최상위로 이동) + if [ -d "${TARGET_DIR}/net10.0" ]; then + echo "Restructuring deployment (moving net10.0 contents to root)..." + mv "${TARGET_DIR}/net10.0"/* "${TARGET_DIR}/" + rmdir "${TARGET_DIR}/net10.0" || true + fi + # 환경 파일 설치 echo "⚙️ Installing environment configuration..." mkdir -p /home/kjh2064/.config diff --git a/quantengine.service b/quantengine.service new file mode 100644 index 00000000..56e2dff7 --- /dev/null +++ b/quantengine.service @@ -0,0 +1,21 @@ +[Unit] +Description=Quant Engine Web Application (.NET 10) +After=network.target +StartLimitIntervalSec=60 +StartLimitBurst=3 + +[Service] +Type=simple +User=kjh2064 +WorkingDirectory=/home/kjh2064/quantengine_active +ExecStart=/usr/bin/dotnet /home/kjh2064/quantengine_active/QuantEngine.Web.dll +Restart=on-failure +RestartSec=10 +SyslogIdentifier=quantengine +StandardOutput=journal +StandardError=journal +Environment="ASPNETCORE_ENVIRONMENT=Production" +Environment="ASPNETCORE_URLS=http://127.0.0.1:5000" + +[Install] +WantedBy=multi-user.target