Static site
Serve static websites from files or a GitHub repo.
- app
- language
Guides: Run your own app, Run a GitHub repo
Run it
briq run staticbriq_run({ recipe: "static", wait: true })curl -X POST https://api.briq.cloud/v1/briqs \
-H "Authorization: Bearer $BRIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipe": "static",
"wait": true
}'
# → { "briqs": [{ "id": "bq_…", … }], "outputs": { "SITE_URL": "…" }, … }
# ... when done, for each briq id
curl -X DELETE https://api.briq.cloud/v1/briqs/<id> \
-H "Authorization: Bearer $BRIQ_API_KEY"stack: app
services:
site:
recipe: static
# its defaults, each a field you can set:
# size: nanoFields
| Name | Type | Options | Default |
|---|---|---|---|
| files | record | { "path": "content" | { base64 } } | — |
| checkout | object | { repo, ref?, token?, path? } | — |
| size | enum | nano, small | "nano" |
| egress | object | { hosts } | — |
Outputs
Returned by briq_run once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.
- SITE_URL
- http://site.<stack>.internal
What it runs
| Briq | Image | Ports | Size | Volume |
|---|---|---|---|---|
| site | nginx:1-alpine | 80 | nano | — |
When to use it
- A page, a report or a small site the agent generated, and a URL to send someone.
- A built frontend (the output of
vite build) that needs no server of its own.
Tips
- A site on GitHub:
checkout: { repo: "github.com/owner/site", path: "public" }serves that folder as it is, downloaded by the briq itself: Run a GitHub repo. A site with a build step runs on the node recipe. - Pass the site as
files:{ "index.html": "…", "app.js": "…" }, images as{ "base64": "…" }. Relative paths go under nginx's root;index.htmlis the home page. - 256 KB in all: for a bigger site, write the files with
briq_files_putonce it runs, or fetch them from inside withbriq_exec(wget). - Publish it as you run it:
briq_run({ recipe: "static", files, expose: "private" })returns aURLonly the people you send it to can open. - Step by step: Run your own app, with a database and a URL.