Docker is the simplest case: capy run is your entrypoint, and the runtime platform (whatever orchestrates the container) sets SECRETS_BLOB and PROJECT_KEY in the container’s env.
Dockerfile
Any language works - swap the base image and the CMD. Python: CMD ["python", "app.py"]. Go: CMD ["./my-binary"]. Ruby: CMD ["bundle", "exec", "rails", "server"].
Running
capy deploy → pick Docker prints a docker run snippet with your exact values filled in.
docker-compose
Set SECRETS_BLOB and PROJECT_KEY in the compose host’s env (your shell, a .env file next to compose.yaml - not the Capy-managed .env inside the project).
Kubernetes
The container image’s ENTRYPOINT ["capy", "run", "--"] wraps your app; Kubernetes injects the two env vars from the Secret.
Image size
@capysc/cli is a single Node binary (~15 MB). If you want a smaller runtime image, multi-stage build with capy run only in the final image - it doesn’t need build tooling.
Revocation
Revoking the deploy token stops new container boots. Running containers keep their in-memory keys until they restart. To force immediate revocation everywhere, rotate the project key. Last modified on June 10, 2026