Guides

Deploy apps

Import a repo, configure service types, ship from git push or Promote, and go live per environment.

How deployment works

  1. Connect a GitHub repo to a Bytstack project (classic import or monorepo checklist).
  2. Configure on Service → Settings: type (fixed after create), build/start commands or Dockerfile path, root directory, build mode, path filters, and Variables.
  3. Deploy from Service → Overview (Deploy now), git push (auto-deploy), or bytstack deploy, Bytstack clones, installs, builds, then publishes a release artifact (container image for web/worker/cron, or static assets for SPAs).
  4. Release: traffic switches to the new deployment (rolling update for web). Open Deployments → detail for the stage timeline, build output, and CLI equivalents.

Statuses: queued → cloning → building → publishing → releasing → live.

With deployment environments enabled, each environment (production, staging, …) has its own services. Use the project switcher (?environment=) so deploys and Variables target the right stage.

Service types

TypeUse forBuildRuntimePublic URL
WebHTTP APIs, SSR (Next.js, Django, Rails), app serversOptionalLong-running containerYes
StaticSPAs (Vite, CRA, Vue, Angular)RequiredCDN / object storageYes
WorkerBackground jobs, queue consumers, stream processorsOptionalLong-running container (no public HTTP)No
CronScheduled tasks (reports, cleanups, batch jobs)OptionalScheduled runsNo

Rule of thumb: client-only UI with a build step and static assets → Static. Any process that listens for HTTP or runs continuously → Web or Worker.

Polyglot examples:

  • Web: Express or Fastify (Node), Flask or FastAPI (Python), Gin (Go), Actix (Rust), Spring Boot (Java)
  • Static: Vite, Create React App, Nuxt static export, Hugo site output
  • Worker: Sidekiq-style consumers, BullMQ workers, Celery workers, custom queue loops
  • Cron: nightly sync, invoice batch, cache warmers

Stack detection

On import, Bytstack inspects the repo (root and each monorepo package) for lockfiles, manifests, and common frameworks. Suggestions are starting points, override in Settings or bytstack.yaml.

SignalTypical service typeDefault build / start hints
Next.js, Nuxt (SSR), Remix, SvelteKit (adapter-node)Webframework build + production server
Django, Flask, FastAPI (requirements.txt / pyproject.toml)Webpip install + WSGI/ASGI server
Rails (Gemfile), Spring Boot (pom.xml / build.gradle)Webbundle/maven build + app server
Express, Fastify (Node package.json with start)Weboptional build + npm start
Vite, CRA, Vue CLI, Angular, Gatsby (static), Astro (static)Staticnpm run build → dist / build / public
Go module with cmd/ or main.goWeb or workergo build binary as start command
Rust (Cargo.toml binary)Web or workercargo build --release
Worker/cron with no HTTPWorker or cronstart command or schedule only

For monorepos, set Root directory to the app folder (for example backend, services/web). Optionally set path filters so only relevant changes trigger deploys.

Node-only: supported majors 18, 20, 22 (default 20, or clamped from engines.node when present).

Package managers (lockfiles)

Detection and install commands prefer committed lockfiles:

EcosystemLockfiles / manifests
Nodepackage-lock.json, pnpm-lock.yaml, yarn.lock, bun.lockb
Pythonrequirements.txt, Pipfile.lock, poetry.lock, uv.lock
RubyGemfile.lock
Gogo.mod / go.sum
RustCargo.lock
Javapom.xml, Gradle lockfiles
PHPcomposer.lock

Commit the lockfile your team uses so builds stay reproducible across machines and Bytstack build machines.

Configuration checklist

SettingNotes
BranchPer-environment; deployed on push when auto-deploy is on; default often matches the env slug (staging) or main for production
Root directorySubfolder that contains the app manifest (package.json, pyproject.toml, go.mod, Cargo.toml, Gemfile, …) or Dockerfile
Build modeisolated (package dir) or workspace (repo-root install + filter), Settings → Build
Path filtersGlobs that gate auto-deploy (empty = every push). Use Suggest workspace defaults in workspace mode, Settings → Git
Build commandAfter install; required for static and for compiled languages
Start commandWeb and worker containers (npm start, gunicorn …, ./server, java -jar …)
DockerfileOptional BYO image, Settings → Build or Blueprint build.dockerfilePath
Publish directoryStatic output folder (Settings groups this under Static site)

Web services must listen on 0.0.0.0 and the injected PORT. Prefer production servers over dev servers in live environments.

Build machine tiers

Any Dockerfile is supported. Choose build capacity independently from your runtime service plan:

Build machineCPU limitMemory limitBuild-minute rate
Standard2 CPU8 GiB1×
Performance4 CPU16 GiB4×

Standard is the default and is the only build machine for static sites. Performance requires both the workspace plan and the service plan to be Starter or Pro. It may remain unavailable until the rollout is enabled for your workspace and deployment environment. A ten-minute Performance build therefore uses 40 tier-weighted build minutes.

Set the machine for the next deploy in Service → Settings → Build machine, with bytstack services update --build-machine-tier standard|performance, or with buildMachineTier in bytstack.yaml. Changing it does not alter an in-progress build.

For exit 137 or an out-of-memory message, reduce peak Docker image build memory or, when the service is eligible and the rollout is enabled, switch to Performance. Performance is an explicit cost choice; Bytstack never upgrades and retries a build automatically. See Pricing & limits.

Custom Dockerfile (BYO)

When build.dockerfilePath is set, Bytstack builds exactly that file. You control base image, toolchain, and install behavior. Native dependencies (below) does not apply to BYO images.

Native dependencies

Some npm packages ship native addons (image libraries, SQLite bindings, cryptography helpers, and similar). They often need an install script during the image build to download a Linux binary or compile from source.

By default, generated Node image builds skip install scripts so installs stay fast and predictable. Turn Native dependencies on for a single service when your app needs those packages and the build fails during npm install or reports a missing binary.

When to enable

Enable it when:

  • The build log points at a dependency that needs compile or prebuild steps (common examples include sharp and better-sqlite3).
  • The same app builds locally with scripts enabled but fails on Bytstack with the setting off.

You usually do not need it when every dependency is plain JavaScript, when you use a custom Dockerfile, or for static services in v1.

How to turn it on

PathWhat to do
DashboardService → Settings → Build: check Native dependencies, Save changes, then deploy.
CLIbytstack services update --native-dependencies (or --no-native-dependencies to turn it off). Applies on the next deploy.
bytstack.yamlSet nativeDependencies: true on the service. See bytstack.yaml and Blueprint.

The setting is per service. Other services in the project can stay off.

What happens on deploy

On the next deploy, Bytstack’s generated Node Dockerfile:

  • Runs install with lifecycle scripts so native packages can download or build Linux binaries.
  • Adds compile tooling only in the build stage of the image. The running container stays on a slim Node base.

Caching: App-only commits usually reuse the install layer (no full recompile). Changing package.json or lockfiles re-runs install, which can take longer when native packages rebuild.

Billing: There is no new meter. You still pay Build minutes (tier-weighted) at the same unit price. Native compiles can run longer, so wall-clock time may increase, especially on the first build or after dependency changes. See Billing and Pricing & limits.

Tips and limits

  • Keep lockfiles committed so installs stay reproducible.
  • Pin versions for native packages you rely on.
  • If install succeeds but the build still runs out of memory, reduce peak image-build work or, when eligible, use the Performance build machine.
  • Static services and BYO Dockerfile services cannot enable Native dependencies in v1, use your Dockerfile instead.
  • The feature may remain unavailable until it is enabled for your workspace.
SymptomWhat to try
Install fails with a native addon error while the setting is offEnable Native dependencies, save, redeploy.
Install is slow after a dependency changeExpected when lockfiles change; later deploys cache the install layer when only app code changes.
Build exits 137 / out-of-memory during installTrim dependencies or parallel work; try Performance when eligible.
Setting is disabled greyed outThe service uses a custom Dockerfile, adjust install in that file.

Git-track vs Promote

PathBehavior
Git-trackEach environment watches its own branch with autoDeploy. Push to staging updates the staging column only.
PromoteAfter soak, Promote copies the image digest (or rebuilds static at the same SHA) into the next environment, not a git merge.

When you add Staging, turn auto-deploy off on Production so accidental pushes to main do not skip soak. Details: Deployment environments.

Auto deploy

With the GitHub App installed, pushes to the configured branch for that service’s environment trigger a new deployment. Disable auto-deploy on the service for manual releases or Promote-only production.

Rollback

Open Deployments, pick a previous successful version, and roll back. No rebuild, the prior artifact stays available (within retain limits).

Logs

  • Build logs: install/compile output for the deploy
  • Runtime logs: live tail from web, worker, and scheduled runs (cron: View runs opens Logs → Runtime with the run selector)

Available in the dashboard and via bytstack logs. Overview and deploy detail show Equivalent: bytstack … hints next to Deploy.

Platform pause

When the platform kill-switch is on, Service Overview shows a banner and Deploy / wake / cancel / rollback stay disabled, you are not left guessing after a failed POST.

Deploy apps | Bytstack Docs