fix(deploy): use Azure-injected PORT instead of hardcoded 2024
- startup.sh now reads ${PORT:-8080} so Azure App Service can inject
the correct port via its PORT environment variable
- Removed obsolete deploy-backend.yml and deploy-frontend.yml workflows
(old Python backend and Next.js frontend pipelines)
- Removed WEBSITES_PORT=2024 from soc-langgraph Azure config
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
b30cb0e758
commit
370726c811
@@ -1,52 +0,0 @@
|
|||||||
name: Deploy Backend to Azure
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
paths:
|
|
||||||
- "backend/**"
|
|
||||||
- ".github/workflows/deploy-backend.yml"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
id-token: write
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Python 3.12
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: "3.12"
|
|
||||||
|
|
||||||
- name: Install dependencies and create package
|
|
||||||
run: |
|
|
||||||
cd backend
|
|
||||||
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
|
|
||||||
zip -r ../deploy.zip . -x ".venv/*" ".env" "__pycache__/*" "*.pyc" ".git/*" "tests/*"
|
|
||||||
|
|
||||||
- name: Login to Azure
|
|
||||||
uses: azure/login@v2
|
|
||||||
with:
|
|
||||||
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E361D63054AD449285A5D65AA4425533 }}
|
|
||||||
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_62D66D4E65AC4A6C872064AD668AC691 }}
|
|
||||||
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_5D7B0564A55F4209A91149F2642D3F69 }}
|
|
||||||
|
|
||||||
- name: Configure startup command
|
|
||||||
run: |
|
|
||||||
az webapp config set \
|
|
||||||
--name soc-backend \
|
|
||||||
--resource-group Operation \
|
|
||||||
--startup-file startup.sh
|
|
||||||
|
|
||||||
- name: Deploy to Azure Web App
|
|
||||||
uses: azure/webapps-deploy@v3
|
|
||||||
with:
|
|
||||||
app-name: soc-backend
|
|
||||||
package: deploy.zip
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
name: Deploy Frontend to Azure Static Web App
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
paths:
|
|
||||||
- "frontend/**"
|
|
||||||
- ".github/workflows/deploy-frontend.yml"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Deploy to Azure Static Web Apps
|
|
||||||
uses: Azure/static-web-apps-deploy@v1
|
|
||||||
with:
|
|
||||||
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
|
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
action: upload
|
|
||||||
app_location: frontend
|
|
||||||
output_location: out
|
|
||||||
Executable → Regular
+2
-2
@@ -21,5 +21,5 @@ if [ ! -d "node_modules" ]; then
|
|||||||
pnpm install --frozen-lockfile
|
pnpm install --frozen-lockfile
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Starting LangGraph server on port 2024..."
|
echo "Starting LangGraph server on port ${PORT:-8080}..."
|
||||||
exec npx langgraphjs dev --host 0.0.0.0 --port 2024 --no-browser
|
exec npx langgraphjs dev --host 0.0.0.0 --port ${PORT:-8080} --no-browser
|
||||||
|
|||||||
Reference in New Issue
Block a user