Command line

Stacks and perkhost.json

How PerkHost picks a stack from your project files, which stacks are supported and what perkhost.json can set.

App hosting is not available yet

This page describes how the CLI and the stack presets are built. Nothing can be deployed until app hosting is available.

How the stack is detected

The CLI looks at the files in the root of the project you deploy. The first marker found, in the order of the table, decides the stack. A backend marker wins over package.json because Laravel and Django projects often carry one for their assets.

Project files and the stack they select
Project fileStackRuntime version
go.modGo1.27
composer.jsonPHP8.3
requirements.txtPython3.12
package.jsonNode.js22
index.htmlStatic siteNot applicable
  • File names are case-sensitive. Package.json is refused with a message to rename it.
  • Python needs a requirements.txt in the root. A project with only pyproject.toml, Pipfile, poetry.lock or setup.py is refused with that explanation.
  • A project file below the root, because you deployed from the wrong folder, is refused with the folder to deploy from.
  • package.json and composer.json must be a JSON object, go.mod needs a module line, and package.json, composer.json, go.mod and requirements.txt may each be at most 262,144 bytes.
  • A project with a Dockerfile and none of these files is refused. Docker deploys are not available yet.

perkhost.json

An optional perkhost.json in the project root can override detection. Unknown keys are an error, and so is invalid JSON; the CLI names the field.

perkhost.json keys
KeyMeaning
stackOne of static, php, node, python, go. It wins over detection.
startA shell command, on one line, that starts the app from its release folder. At most 1,024 characters.
perkhost.json
{
  "stack": "node",
  "start": "node server.js"
}

The port your app listens on

An app listens on one HTTP port, 8080. PerkHost also passes that number to the app in the PORT environment variable.

Not supported

Docker images and Dockerfiles, WordPress and catalog templates have no stack image today.