Framework guides
Every framework has its own way of compiling, starting, and listening for connections. This section collects tested configurations for the most popular frameworks, with the exact values you enter in the Zenifra console.
Choosing a path
Zenifra deploys applications in two ways:
| Path | When to use | Languages |
|---|---|---|
| GitHub Repository | You want Zenifra to install dependencies, build, and deploy on every change | Node.js and Python |
| OCI Image | Your app uses another language or you already build a Docker image in CI | Any language that runs in a container |
Rule of thumb
If the project is Node.js or Python, start with GitHub Repository: there is no Dockerfile to maintain. For Go, Java, PHP, .NET, Ruby, Rust, or static sites served by NGINX, use OCI Image with one of the ready-made Dockerfiles from the Dockerfile guide.
Quick reference table
| Framework | Path | Suggested port | Build | Start |
|---|---|---|---|---|
| Next.js | GitHub · Node.js | 3000 | npm run build | npx next start -H 0.0.0.0 -p 3000 |
| Express / Fastify | GitHub · Node.js | 3000 | empty or npm run build | node index.js |
| NestJS | GitHub · Node.js | 3000 | npm run build | node dist/main.js |
| Vite, React, Vue, static Astro | GitHub · Node.js or OCI | 3000 / 80 | npm run build | npx serve -s dist -l tcp://0.0.0.0:3000 |
| FastAPI | GitHub · Python | 8000 | empty | uvicorn main:app --host 0.0.0.0 --port 8000 |
| Flask | GitHub · Python | 8000 | empty | gunicorn app:app --bind 0.0.0.0:8000 |
| Django | GitHub · Python | 8000 | python manage.py collectstatic --noinput | gunicorn config.wsgi --bind 0.0.0.0:8000 |
| Go | OCI | 8080 | in the Dockerfile | image binary |
| Spring Boot | OCI | 8080 | in the Dockerfile | java -jar app.jar |
| Laravel | OCI | 8080 | in the Dockerfile | image server |
| ASP.NET Core | OCI | 8080 | in the Dockerfile | dotnet App.dll |
The port in the table is a suggestion. What matters is that the project Port field is equal to the port your app listens on.
The three rules that prevent 90% of problems
1. Listen on 0.0.0.0
The app must accept connections from outside the container. Servers that listen only on localhost or 127.0.0.1 start without errors but never receive traffic.
2. Use the port configured in the project
Zenifra forwards traffic to the port set in the Port field. If the app listens on 3000 and the project is set to 8080, the public URL does not respond. Pinning the port in the start command keeps the configuration explicit and easy to review.
3. Configure everything with environment variables
Database URLs, API keys, and secrets belong in environment variables, never in code. In GitHub projects, project variables are also available during install, pre-build, and build.
What happens in a GitHub deployment
Dependency install: npm ci (Node.js) or pip install -r requirements.txt (Python).
pre-build (optional): preparation, such as generating ORM clients.
build (optional): compilation, such as npm run build or collectstatic.
start (required): the long-running process that serves requests.
Version details and runtime behavior are in Runtimes.
Framework not listed?
- Node.js or Python: follow the closest guide. The structure is always the same: dependencies, an optional build, and a command that listens on
0.0.0.0on the project port. - Another language: write a Dockerfile that meets the requirements in the Dockerfile guide and deploy it as an OCI Image.
- Ready-made app (n8n, Metabase, WordPress): use a Template.
Next steps
Last updated on