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

PieceWhat it is
Repo + branchTypically main on a GitHub repo, but any git remote works. Configured via git_repository_url on the app.
ProcfileDeclares process types (web, worker, etc.). Same shape as Heroku.
Build typebuildpacks (herokuish auto-detect) or dockerfile. See Build types.
Config varsEnvironment variables, set per-app, applied to every stack the app deploys to.
Linked servicesPostgres, MySQL, Redis, MongoDB — whichever the app needs.
Domains & SSLOne or more domains routed to the app via the stack's nginx.
StacksWhere 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_typeUsed for
railsRails apps — auto-links Postgres, sets up release tasks.
nestjsNestJS apps — auto-links MongoDB, sets MONGO_URI.
angularStatic Angular builds (front-end only).
dockerfileDockerfile-based, no buildpack.
rawAnything 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>