Files
KArtSell.Aegis/scripts/deploy-local.sh
kjh2064 0507dd6065
ci / backend (push) Failing after 0s
ci / static (push) Failing after 8s
Build & Test with Secrets / build (push) Failing after 1s
ci / frontend (push) Failing after 1m25s
Build & Test with Secrets / security-scan (push) Failing after 5s
ci / publish (push) Has been skipped
Build & Test with Secrets / frontend (push) Failing after 1m26s
Build & Test with Secrets / notification (push) Failing after 1s
deploy / deploy (push) Failing after 1m47s
deploy / notify (push) Successful in 1s
Remove remote deploy.yml - use local deployment only
ci.yml publish step generates kartsell-release.zip for local deployment.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-05 22:53:27 +09:00

58 lines
2.1 KiB
Bash

#!/bin/bash
# Local deployment script for K-ArtSell Aegis
# Usage: ./scripts/deploy-local.sh
set -e
echo "═══════════════════════════════════════════════════════"
echo "K-ArtSell Aegis Local Deployment"
echo "═══════════════════════════════════════════════════════"
# Check prerequisites
if ! command -v dotnet &> /dev/null; then
echo "❌ .NET SDK not found"
exit 1
fi
# Build
echo "📦 Building project..."
dotnet build KArtSell.sln -c Release --no-restore
# Test
echo "✅ Running tests..."
dotnet test KArtSell.sln --no-build -c Release --logger trx
# Publish
echo "📤 Publishing application..."
PUBLISH_DIR="/tmp/kartsell-publish"
rm -rf "$PUBLISH_DIR"
dotnet publish -c Release -o "$PUBLISH_DIR" src/KArtSell.Host
echo ""
echo "═══════════════════════════════════════════════════════"
echo "✅ Deployment Package Ready"
echo "═══════════════════════════════════════════════════════"
echo ""
echo "Published to: $PUBLISH_DIR"
echo ""
echo "To run locally:"
echo ""
echo " # Terminal 1: SSH Tunnel"
echo " ssh -L 5432:127.0.0.1:5432 kjh2064@178.104.200.7"
echo ""
echo " # Terminal 2: Start Application"
echo " cd $PUBLISH_DIR"
echo " export ASPNETCORE_ENVIRONMENT=Production"
echo " export KARTSELL_POSTGRES=\"Host=localhost;Port=5432;Database=kartsell;Username=kartsell;Password=kartsell\""
echo " export KRX_OPENAPI=\"<API-KEY>\""
echo " export OPENDART_API=\"<API-KEY>\""
echo " export KIS_APP_KEY=\"<KEY>\""
echo " export KIS_APP_SECRET=\"<SECRET>\""
echo " dotnet KArtSell.Host.dll"
echo ""
echo " # Terminal 3: Test API"
echo " curl -H 'X-KArtSell-User: admin' \\"
echo " -H 'X-KArtSell-Role: Admin' \\"
echo " http://127.0.0.1:5002/health"
echo ""