test(ci): add watch paths phase 4 fixture
This commit is contained in:
38
README.md
38
README.md
@@ -1,36 +1,8 @@
|
||||
# OpenAI Chat Demo
|
||||
# Watch paths Phase 4 fixture
|
||||
|
||||
A small web chat service that sends questions to the OpenAI Responses API. The browser talks only to this app; `API_KEY` stays in the server container and is never sent to the browser.
|
||||
Small two-service monorepo used to accept the per-service Gitea watch-path filtering flow.
|
||||
|
||||
## Configuration
|
||||
- `web/` builds from repository root and uses `packages/shared`, root npm workspace manifests, and `healthcare-miniapp/package.json` as build inputs.
|
||||
- `backend/` builds from its own directory and has no dependency on web files.
|
||||
|
||||
The container uses exactly two application environment variables:
|
||||
|
||||
| Variable | Purpose | Example |
|
||||
| --- | --- | --- |
|
||||
| `MODEL` | OpenAI model name to call | `gpt-4.1-mini` |
|
||||
| `API_KEY` | OpenAI API key; configure this as a secret | Set it in the runtime secret manager |
|
||||
|
||||
The app listens on port `8080`.
|
||||
|
||||
## Run with Docker
|
||||
|
||||
Set the real key in your shell or secret manager, then run:
|
||||
|
||||
```sh
|
||||
docker run --rm -p 8080:8080 \
|
||||
-e MODEL=gpt-4.1-mini \
|
||||
-e API_KEY \
|
||||
lucnguyen666/aisp-openai-chat-demo:1.0.0
|
||||
```
|
||||
|
||||
Open <http://localhost:8080>. For a platform deployment, map `MODEL` as a regular environment variable and `API_KEY` as a secret environment variable.
|
||||
|
||||
## Build locally
|
||||
|
||||
```sh
|
||||
docker build -t aisp-openai-chat-demo:local .
|
||||
docker run --rm -p 8080:8080 -e MODEL=gpt-4.1-mini -e API_KEY aisp-openai-chat-demo:local
|
||||
```
|
||||
|
||||
The chat history is held in browser memory for the current page session. The server calls `POST https://api.openai.com/v1/responses` with `store: false`. It does not log prompts or API keys.
|
||||
Both containers expose `/health` on port 8080. No external services or credentials are needed.
|
||||
|
||||
Reference in New Issue
Block a user