Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .codex/skills/Amap_webservice_api_skill
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ DATABASE_URL=sqlite://data/angui.db?mode=rwc
ANGUI_SESSION_TTL_HOURS=8
# Absolute safety cap for a single intake answer. Per-question business limits live in the database.
ANGUI_INTAKE_ANSWER_HARD_MAX=2000
# Optional server-only AMap Web Service key. Never expose this key to browsers, logs, or commits.
# AMAP_WEBSERVICE_KEY=
AMAP_WEBSERVICE_BASE_URL=https://restapi.amap.com
AMAP_TIMEOUT_MS=2500
# Empty by default: the gateway returns the deterministic rule-based path.
# Set this to a JSON array of provider policies. endpoint_env and credential_env
# are environment-variable names, not URLs or secrets. See docs/AI_GATEWAY.md.
Expand Down
11 changes: 11 additions & 0 deletions .github/WORKFLOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,17 @@ Recommended variables:
- `PREVIEW_RUNTIME_IMAGE=angui-preview-runtime:bookworm`
- `PREVIEW_ENVIRONMENT=preview`

Optional preview secret:

- `AMAP_WEBSERVICE_KEY`: a restricted, non-production AMap Web Service key.
Preview deployment passes it only to the API container at runtime. It is not
exposed to frontend builds, preview artifacts, migrations, bootstrap jobs, or
workflow logs. When omitted, the API deliberately uses its documented map
degradation path. Prefer the `preview` GitHub Environment Secret of this
name, with deployment branch restrictions or required reviewers. A repository
secret of the same name also works, but grants the credential to every
eligible preview deployment and is therefore less restrictive.

The VM needs Docker Engine, Compose v2, `curl`, port 80 reachable from the
parent Nginx, and permission for the runner service account to run Docker. No
SSH deployment secrets, GHCR read token, preview port range, DNS credentials, or
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ jobs:
PREVIEW_PROXY_NETWORK: ${{ vars.PREVIEW_PROXY_NETWORK || 'angui-proxy' }}
PREVIEW_RUNTIME_IMAGE: ${{ vars.PREVIEW_RUNTIME_IMAGE || 'angui-preview-runtime:bookworm' }}
PREVIEW_DEMO_PASSWORD: ${{ steps.credentials.outputs.password }}
AMAP_WEBSERVICE_KEY: ${{ secrets.AMAP_WEBSERVICE_KEY }}
PREVIEW_REPOSITORY_DIR: ${{ github.workspace }}
PREVIEW_BACKEND_DIR: ${{ github.workspace }}/.preview/backend
PREVIEW_FRONTEND_DIR: ${{ github.workspace }}/.preview/frontend
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
PREVIEW_PROXY_NETWORK: ${{ vars.PREVIEW_PROXY_NETWORK || 'angui-proxy' }}
PREVIEW_RUNTIME_IMAGE: ${{ vars.PREVIEW_RUNTIME_IMAGE || 'angui-preview-runtime:bookworm' }}
PREVIEW_DEMO_PASSWORD: ${{ steps.credentials.outputs.password }}
AMAP_WEBSERVICE_KEY: ${{ secrets.AMAP_WEBSERVICE_KEY }}
PREVIEW_REPOSITORY_DIR: ${{ github.workspace }}
PREVIEW_BACKEND_DIR: ${{ github.workspace }}/.preview/backend
PREVIEW_FRONTEND_DIR: ${{ github.workspace }}/.preview/frontend
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ jobs:
PREVIEW_PROXY_NETWORK: ${{ vars.PREVIEW_PROXY_NETWORK || 'angui-proxy' }}
PREVIEW_RUNTIME_IMAGE: ${{ vars.PREVIEW_RUNTIME_IMAGE || 'angui-preview-runtime:bookworm' }}
PREVIEW_DEMO_PASSWORD: ${{ steps.credentials.outputs.password }}
AMAP_WEBSERVICE_KEY: ${{ secrets.AMAP_WEBSERVICE_KEY }}
PREVIEW_REPOSITORY_DIR: ${{ github.workspace }}
PREVIEW_BACKEND_DIR: ${{ github.workspace }}/.preview/backend
PREVIEW_FRONTEND_DIR: ${{ github.workspace }}/.preview/frontend
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule ".codex/skills/Amap_webservice_api_skill"]
path = .codex/skills/Amap_webservice_api_skill
url = https://github.com/cg8-5712/Amap_webservice_api_skill.git
Loading
Loading