deploy: support configurable backend host for frontend API URL
All checks were successful
Deploy to Production / deploy (push) Successful in 57s

This commit is contained in:
codex
2026-03-11 17:55:07 +08:00
parent aeb7a8b678
commit f0a0667b84
2 changed files with 2 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ jobs:
run: |
cat > .env.production << 'ENVEOF'
DOMAIN=${{ secrets.DOMAIN }}
BACKEND_HOST=${{ secrets.BACKEND_HOST }}
FRONTEND_HOST=${{ secrets.FRONTEND_HOST }}
ENVIRONMENT=production
PROJECT_NAME=${{ secrets.PROJECT_NAME }}

View File

@@ -81,7 +81,7 @@ services:
context: .
dockerfile: frontend/Dockerfile
args:
- VITE_API_URL=https://api.${DOMAIN?Variable not set}
- VITE_API_URL=https://${BACKEND_HOST:-api.${DOMAIN?Variable not set}}
- NODE_ENV=production
networks: