Go app
Your Go code running as a service, from files or a GitHub repo: it builds the module and starts the binary. No image to build.
- app
- language
Guides: Run your own app, Run a GitHub repo
Run it
briq_run({
recipe: "go",
params: {
"version": "1.25",
"port": 8080,
"env": {},
"size": "small"
},
wait: true
})curl -X POST https://api.briq.cloud/v1/briqs \
-H "Authorization: Bearer $BRIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipe": "go",
"params": {
"version": "1.25",
"port": 8080,
"env": {},
"size": "small"
},
"wait": true
}'
# → { "briqs": [{ "id": "bq_…", … }], "outputs": { "APP_URL": "…" }, … }
# ... when done, for each briq id
curl -X DELETE https://api.briq.cloud/v1/briqs/<id> \
-H "Authorization: Bearer $BRIQ_API_KEY"Parameters
| Name | Type | Options | Default |
|---|---|---|---|
| version | enum | 1.25, 1.24 | "1.25" |
| files | record | { "path": "content" | { base64 } } | — |
| repo | object | { url, ref?, dir?, token? } | — |
| install | string | — | — |
| build | string | — | — |
| start | string | — | — |
| port | number | — | 8080 |
| env | record | { NAME: "value" | { secret, value? } } | {} |
| size | enum | nano, small, medium, large | "small" |
| diskGb | number | — | — |
Outputs
Returned by briq_run once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.
- APP_URL
- http://app.<stack>.internal:8080
What it runs
| Briq | Image | Ports | Size | Volume |
|---|---|---|---|---|
| app | golang:1.25-alpine | 8080 | small | — |
When to use it
- You wrote a Go service and want it built and running next to its database, without a Dockerfile or a registry.
Tips
- Code in a repo: pass
repo: { url: "github.com/owner/app" }instead offiles. See Run a GitHub repo. - Pass the module as
files:go.mod,main.goand the rest, with relative paths (they go under/app).go.sumtoo when there are dependencies. - It builds at each start (
go build), then runs the binary. The build cache stays on the disk, so a restart rebuilds in seconds; the first start downloads modules and takes longer. If it outlastsbriq_run's two minutes, the briq showscreatinguntil the build is done:briq_statustells you when it runs. ListenAndServe(":" + os.Getenv("PORT"), …)listens on IPv6 and IPv4; 8080 by default.- Publish it as you run it with
expose: "private"(or"public"for anyone): it returnsURL. - Step by step: Run your own app, with a database and a URL.