From 331b8e3a30639a450050f2a590f9d3cc2a34675f Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sat, 11 Jul 2026 20:57:06 +0900 Subject: [PATCH] fix: Correct deployment directory structure in deploy-prod.yml - Add deployment structure normalization step after tar extraction - If net10.0 subdirectory exists, move its contents to deployment root - Create corrected systemd service file (quantengine.service) - Fixes issue where .NET DLLs were incorrectly placed in net10.0 subdirectory This ensures compatibility with existing ExecStart path in systemd service: ExecStart=/usr/bin/dotnet /path/to/QuantEngine.Web.dll Co-Authored-By: Claude Haiku 4.5 --- .gitea/workflows/deploy-prod.yml | 7 +++++++ quantengine.service | 21 +++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 quantengine.service 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