Framework guides

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:

PathWhen to useLanguages
GitHub RepositoryYou want Zenifra to install dependencies, build, and deploy on every changeNode.js and Python
OCI ImageYour app uses another language or you already build a Docker image in CIAny 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

FrameworkPathSuggested portBuildStart
Next.jsGitHub · Node.js3000npm run buildnpx next start -H 0.0.0.0 -p 3000
Express / FastifyGitHub · Node.js3000empty or npm run buildnode index.js
NestJSGitHub · Node.js3000npm run buildnode dist/main.js
Vite, React, Vue, static AstroGitHub · Node.js or OCI3000 / 80npm run buildnpx serve -s dist -l tcp://0.0.0.0:3000
FastAPIGitHub · Python8000emptyuvicorn main:app --host 0.0.0.0 --port 8000
FlaskGitHub · Python8000emptygunicorn app:app --bind 0.0.0.0:8000
DjangoGitHub · Python8000python manage.py collectstatic --noinputgunicorn config.wsgi --bind 0.0.0.0:8000
GoOCI8080in the Dockerfileimage binary
Spring BootOCI8080in the Dockerfilejava -jar app.jar
LaravelOCI8080in the Dockerfileimage server
ASP.NET CoreOCI8080in the Dockerfiledotnet 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.0 on 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

On this page