Apps
An app in OwnStack is what you'd call an app anywhere else: a codebase that runs as one or more processes, with environment variables, optional databases, and at least one URL. Apps deploy to one or more stacks.
The shape of an app
| Piece | What it is |
|---|---|
| Repo + branch | Typically main on a GitHub repo, but any git remote works. Configured via git_repository_url on the app. |
| Procfile | Declares process types (web, worker, etc.). Same shape as Heroku. |
| Build type | buildpacks (herokuish auto-detect) or dockerfile. See Build types. |
| Config vars | Environment variables, set per-app, applied to every stack the app deploys to. |
| Linked services | Postgres, MySQL, Redis, MongoDB — whichever the app needs. |
| Domains & SSL | One or more domains routed to the app via the stack's nginx. |
| Stacks | Where it deploys. An app can target one stack or many. |
One app, many stacks
Most apps deploy to a single stack. Some deploy to multiple — for example a staging stack and a production stack, or a primary and a regional failover. Add or remove deploy targets in the dashboard's Deploy targets tab, or via the CLI:
$ ownstack app stacks <app>
$ ownstack app stacks:add <app> <stack-name>
$ ownstack app stacks:remove <app> <stack-name>
When an app has multiple stacks, one ownstack deploy deploys to all of them in parallel. Each stack has its own dokku state — its own scale, running processes, and logs. See Multi-stack deploys.
The .ownstack-config file
A small file in your repo that links your local checkout to a specific app on a specific control plane. It carries the app token used by ownstack deploy, ownstack run, etc.
$ ownstack remote -a <app>
✓ This repo is now linked to app id 47
$ ownstack remote
Linked to: my-app (id 47) on profile 'ownstack'
Add it to .gitignore; it contains your app token. Multiple checkouts of the same repo can each link to different apps without conflicting.
App roles & types
Apps have an app_role (user or system). Most apps you create are user. The app_type classifies how the app should be treated by the build system:
| app_type | Used for |
|---|---|
rails | Rails apps — auto-links Postgres, sets up release tasks. |
nestjs | NestJS apps — auto-links MongoDB, sets MONGO_URI. |
angular | Static Angular builds (front-end only). |
dockerfile | Dockerfile-based, no buildpack. |
raw | Anything else; you supply Procfile + buildpack settings. |
Inspecting an app
$ ownstack app list
$ ownstack app info <app>
$ ownstack config --app=<app> # config vars
$ ownstack remote logs --app=<app> --tail 100
$ ownstack app stacks <app>
$ ownstack app domains <app>
Read next
- Procfile — declaring process types.
- Config vars — environment variables.
- Domains & SSL — custom domains and certs.
- Stacks — where apps run.