Deploys
Every git push to main of your app’s repo deploys it. Like this:
git push ─► GitHub Actions ─► gitleaks ─► "test" stage ─► build ─► Trivy ─► GHCR │your VPS ◄── SSH with a key that can only run "deploy <this app>" ◄───────┘ └─ pulls the image ─► migrations ─► new version next to the old ─► health check └─ healthy: stops the old └─ fails: old keeps runningStep by step
Section titled “Step by step”- Secrets. gitleaks looks for keys and tokens that slipped into the code. If it finds one, it stops.
- Tests. Builds your Dockerfile’s
teststage, if there is one, in whatever language. If it fails, nothing is deployed. - Image and scan. Builds the image and Trivy checks it against known vulnerabilities. A vulnerable image never reaches the registry.
- Publish. The image goes to GHCR (GitHub’s registry), private.
- Its own key. The pipeline reaches your server with a key that can only run that app’s deploy. It doesn’t open a shell.
- Migrations. If your app defines them (
migrateinapp.yml), they run before what’s in production changes. - New version alongside. Starts next to the current one and has to pass its health
check: your
--healthroute, or the image’sHEALTHCHECK, or 10 s without restarting. - The switch. Only then is the old one stopped. If something failed, the old one keeps running and the pipeline tells you why: see When something fails.
- Cleanup. Only the new image and the previous one stay on the server; the rest are
removed so the disk doesn’t fill up (they stay on GHCR:
andamio app rollbackpulls them again).
Images are built on GitHub Actions, never on your VPS: that’s why a small server is enough.
Build secrets
Section titled “Build secrets”Some secrets are only needed to build the image, not to run it: a private npm package’s token, Sentry’s for uploading source maps. Those go in your app repo’s Secrets on GitHub, and are named in its workflow:
with: build_secrets: NPM_TOKEN SENTRY_AUTH_TOKEN secrets: ANDAMIO_SECRETS: ${{ toJSON(secrets) }} # already thereAnd in your Dockerfile:
RUN --mount=type=secret,id=NPM_TOKEN NPM_TOKEN=$(cat /run/secrets/NPM_TOKEN) npm ciBuildKit mounts each one only during that RUN: it never stays in an image layer. Secrets
your app reads while running go through
andamio app secret.
If Trivy blocks your image
Section titled “If Trivy blocks your image”Official base images usually ship their package manager (npm, pip, setuptools), with
its own vulnerabilities, and it isn’t used in production. Remove it from the final stage:
RUN pip uninstall -y pip setuptools# orRUN rm -rf /usr/local/lib/node_modules/npmIf the findings are in your dependencies, update them. The Dockerfiles andamio generates already come this way.
Bring your apps’ pipeline up to date
Section titled “Bring your apps’ pipeline up to date”Each app’s pipeline is pinned to an andamio version (a SHA in its
.github/workflows/andamio.yml): that way an andamio update never changes how an app
deploys without warning. To bring the pipeline’s improvements (the error hints, for
example) to your existing apps:
andamio app ci-update # all of themandamio app ci-update myapp # oneBy default it doesn’t deploy: the improvements are used on each app’s next git push. If
you answer yes, it deploys each one right away.
See the logs
Section titled “See the logs”andamio app logs myappLive logs of the container that’s in production.