Create an app
andamio app create myapp --repo your-user/myapp --health /healthz --publicYou do this once per app. From then on, every git push to main of your app’s repo
deploys it.
What your app needs
Section titled “What your app needs”- A private GitHub repo. While your copy of andamio is private, GitHub doesn’t let a
public repo use its pipeline;
app createwarns you before touching anything. - A
Dockerfile. That’s the contract: with it, any language works. If it doesn’t have one, andamio suggests one (see below). - To listen on
0.0.0.0, notlocalhost, on the port in$PORT(or your Dockerfile’sEXPOSE). - Optional, but recommended:
- a health route that returns
200when the app is ready (for example/healthz); - a
teststage in your Dockerfile: the pipeline builds it before deploying, and if it fails nothing is deployed.
- a health route that returns
If it has no Dockerfile
Section titled “If it has no Dockerfile”app create detects the language and suggests one ready for the pipeline:
| Detects | From |
|---|---|
| Node (npm, pnpm, yarn) | package.json |
| Python | requirements.txt or pyproject.toml |
| Go | go.mod |
| Static site | index.html |
The Dockerfile it generates has a test stage if it finds tests, a minimal final image
without npm or pip (so the vulnerability scan doesn’t block it) and runs without
root. Before pushing anything it shows you:
Your app will start with: uvicorn main:app --host 0.0.0.0 --port $PORT(it listens on port 8000: andamio passes it $PORT=8000)Start it like this?If your app starts differently, type your command. If you answer just a number, it’s taken as the port. It’s yours: change it as needed afterwards.
What app create does
Section titled “What app create does”- Asks for your sudo password at the start (if it will be remembered), so it doesn’t stop you halfway. Then checks your app’s repo and, if needed, generates the Dockerfile.
- Pre-check: looks for what would make the first deploy fail or lose data (see below).
- Creates
apps/myapp/app.ymlin your copy, its encrypted secrets and a deploy key that can only deploy that app. - If you asked for
--dbor--redis, prepares its user and database. - Pushes your copy and applies it on the server: only that app and the app registry, not everything.
- Offers to push to your app’s repo what it’s missing: the Dockerfile and
.github/workflows/andamio.yml. - That push is the first deploy, and it follows it in your terminal: secrets, tests, scan, image and deploy. If it fails, it shows the step, its last log lines and a hint.
Pre-check
Section titled “Pre-check”Before registering anything, andamio reads your app’s code and warns you, with the file and the line:
| It finds | Why it matters |
|---|---|
A committed .env |
Serious: your secrets stay in git history. Remove it, rotate those keys and set them with andamio app secret set |
Listens on localhost |
Serious: inside the container nobody else reaches it. Make it listen on 0.0.0.0 |
| A fixed port different from the one that will be used | Read the port from PORT, or create the app with --port |
| Stores files or a SQLite database | In a container they’re lost on every deploy: use --volume /data or --db |
Redis without REDIS_URL, or without a key prefix |
andamio gives Redis only as REDIS_URL, with its own user that can only use myapp:… keys: read REDIS_URL and set that prefix (keyPrefix in ioredis, prefix in BullMQ) |
| An unsupported base image (Node < 22 or odd, Python ≤ 3.9, Debian buster or bullseye) | It no longer gets patches, and the pipeline’s scan may stop the deploy |
| npm in the final image | Trivy often finds CVEs in it that stop the deploy: remove it in the last stage and start with node, not npm start |
A heavy final image (node:22, python:3.13 without -slim or -alpine), or a single stage with npm install |
Every deploy pushes and pulls more; with -slim/-alpine and several stages it’s several times smaller |
COPY . without .dockerignore |
Everything goes into the image, .git (your history) included |
The Dockerfiles andamio generates pass their own pre-check. If something is serious, it asks whether to go on anyway. What only runs on your machine (the
if __name__ == "__main__": block when the container starts with uvicorn or gunicorn)
doesn’t count.
Options
Section titled “Options”| Option | What it does |
|---|---|
--repo owner/repo |
Your app’s repo |
--public |
Reachable from the internet. Without it, VPN only |
--health /path |
Health route: the new version has to answer 200 before getting traffic |
--port 3000 |
Your app’s port (default: the Dockerfile’s EXPOSE) |
--db |
Its own PostgreSQL database and user (DATABASE_URL) |
--mysql |
Its own MariaDB database and user, MySQL-compatible (MYSQL_URL, plus Laravel’s DB_*). See PostgreSQL, MariaDB and Redis |
--redis |
Its own Redis user, limited to its keys (REDIS_URL) |
--host api |
Another subdomain: api.yourdomain.com. --host @ is the root domain |
--domain app.yourcompany.com |
A domain of your own, besides yours |
--cors https://myapp.vercel.app |
Lets that frontend call your app |
--volume /data |
A folder that persists across deploys and is backed up. Repeatable. See Manage an app |
--env-file .env.production |
The variables the app needs to start (KEY=value), encrypted with its secrets before the first deploy. The plain text is never pushed. With -, read from standard input |
--mem 512m |
Memory limit (default 256m) |
See Domains and URLs and Backend only.
apps/myapp/app.yml
Section titled “apps/myapp/app.yml”Your app’s definition, in your copy. app create generates it. The usual changes don’t need
editing it: andamio app set (RAM, CPU,
port, health, access); for the rest, edit it and apply with andamio app apply myapp.
| Key | Meaning |
|---|---|
port |
The port your app listens on inside the container |
health |
HTTP path checked before a new version gets traffic. Without it, the image’s HEALTHCHECK is used; with neither, “healthy” = 10 s running without restarting |
access |
vpn (default) or public |
db, redis |
Its own PostgreSQL database and user, and its Redis user |
migrate |
{ command: "python manage.py migrate" }: runs with your app’s image before each deploy |
worker |
{ command: "..." }: a second process with the same image |
volumes |
[/data]: folders that persist across deploys |
cron |
Scheduled tasks (name, schedule, command): easiest with andamio app cron add |
resources |
mem, cpus and pids limits |