Deploying
Dockerfile apps
How Jokku builds your Dockerfile, picks the port, and finds your process types.
Building from a Dockerfile is the default. On each push, Jokku builds the Dockerfile at the root of the repo with BuildKit, turns the image into a root filesystem for its microVMs, and rolls the new version out.
The port#
Your app should listen on $PORT. Jokku sets it to the first of these that applies:
- The
PORTconfig var, if you set one:jokku config:set myapp PORT=3000. - The port the image
EXPOSEs. An image inherits its base image's ports (nginx's 80, say), so when there are several, the ones from the newestEXPOSEstep win. - The image's own
PORTenvironment variable. - Otherwise,
5000.
Each deploy tells you which it used:
Another Dockerfile or directory#
To build a different Dockerfile, or build from a subdirectory of the repo:
builder:dockerfile is also how you switch an app back to building from git after it ran a compose file or a registry image.
Process types#
Without a Procfile, the app has a single web process that runs the image's ENTRYPOINT and CMD. To run more than one kind of process, add a Procfile to your repo:
Only web runs at first; scale the others to start them. See Processes & scaling.
For a Procfile somewhere else, relative to the build dir:
Private base images#
If your Dockerfile starts FROM an image in a private registry, log in once and every build can pull it:
Rebuild without a push#
ps:rebuild builds the last pushed source again and deploys it, for example to pick up a newer base image:
Git settings#
Not supported yet#
- Build args.
docker-options:add ... buildis planned. - Buildpacks. Herokuish, Cloud Native Buildpacks, nixpacks and railpack aren't supported for now: Jokku builds Dockerfiles, compose files and registry images.