# LFAPI build instructions

This source release corresponds to the LFAPI image served by
`https://ai.liangfeng.net.cn`.

## Fixed upstream sources

- Application: `QuantumNous/new-api` tag `v1.0.0-rc.27`, commit
  `eb48396d5fe97d27772d0cd5e3ca8aa5caa4f3e9`
- Documentation: `QuantumNous/new-api-docs-v1`, commit
  `89e9d7d14e273f6234ead84de78d20ace3b26c91`

## Application image

From the unpacked application archive, build the Linux amd64 image with Docker:

```bash
docker build --platform linux/amd64 -t lfapi:v1.0.0-rc.27-lf.10 .
```

The image uses its supplied multi-stage Dockerfile. It builds the web assets with
Bun, compiles the Go application, and packages the result in a Debian runtime
image. The runtime data directory is `/data`; no database, environment file, or
credential is included in this release.

## Documentation

The documentation archive contains a self-contained LFAPI static documentation
site in `lfapi-site/`. Publish its three files and the shared logo beneath
`/docs` in the web server. It has no runtime dependency on the upstream
documentation site, search service, analytics, or a long-running Node process.

```bash
install -m 0644 lfapi-site/index.html /var/www/lfapi-docs/index.html
install -m 0644 lfapi-site/styles.css /var/www/lfapi-docs/styles.css
install -m 0644 lfapi-site/site.js /var/www/lfapi-docs/site.js
install -m 0644 public/assets/lfapi.svg /var/www/lfapi-docs/assets/lfapi.svg
```

The documentation site does not start a long-running Node service.
