Ruby app
Your Ruby code running as a service, from files or a GitHub repo: it bundles the Gemfile and starts it. No image to build.
- app
- language
Guides: Run your own app, Run a GitHub repo
Run it
briq_run({
recipe: "ruby",
params: {
"version": "3.4",
"packages": [],
"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": "ruby",
"params": {
"version": "3.4",
"packages": [],
"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 | 3.4, 3.3 | "3.4" |
| files | record | { "path": "content" | { base64 } } | — |
| repo | object | { url, ref?, dir?, token? } | — |
| packages | string[] | — | [] |
| 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 | ruby:3.4-slim | 8080 | small | — |
When to use it
- You wrote a Sinatra, Roda or Rack app and want it running next to its database, without building an image.
Tips
- Code in a repo: pass
repo: { url: "github.com/owner/app" }instead offiles. See Run a GitHub repo. - Pass the code as
files:{ "app.rb": "…", "Gemfile": "…" }. Relative paths go under/app, written before the app starts and again whenever it starts over. - The
Gemfileis bundled at each start;packages: ["sinatra"]installs gems without one. Gems stay on the disk, so restarts are quick. startis the command when it is notruby app.rb, e.g."bundle exec rackup -o :: -p 8080".- Listen on
::and onENV["PORT"](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.