Framework guides

Framework guides

Every framework has its own way of compiling, starting, and listening for connections. This section collects reference 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
Git repository (GitHub or Forgejo)You want Zenifra to install dependencies, build, and deploy on every changeNode.js, Python, Bun, Go, Java, and PHP
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, Python, Bun, Go, Java, or PHP, start with a Git repository: there is no Dockerfile to maintain. For .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.jsGit · Node.js3000npm run buildnpx next start -H 0.0.0.0 -p 3000
Express / FastifyGit · Node.js3000empty or npm run buildnode index.js
NestJSGit · Node.js3000npm run buildnode dist/main.js
Vite, React, Vue, static AstroGit · Node.js or OCI3000 / 80npm run buildnpx serve -s dist -l tcp://0.0.0.0:3000
FastAPIGit · Python8000emptyuvicorn main:app --host 0.0.0.0 --port 8000
FlaskGit · Python8000emptygunicorn app:app --bind 0.0.0.0:8000
DjangoGit · Python8000python manage.py collectstatic --noinputgunicorn config.wsgi --bind 0.0.0.0:8000
GoGit · Go8080go build -o app ../app
Spring Boot (Maven)Git · Java8080mvn -B -DskipTests packagejava -jar target/*.jar
LaravelGit · PHP8080empty (with Vite, see the guide)frankenphp php-server --listen :$PORT --root public/
SymfonyGit · PHP8080emptyfrankenphp php-server --listen :$PORT --root public/
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 most 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 Git projects, project variables are also available during install, pre-build, and build.

What happens in a Git deployment

Dependency install: npm ci (Node.js), bun install --frozen-lockfile (Bun), or pip install -r requirements.txt (Python, when the file exists).

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, Python, Bun, Go, Java, or PHP: follow the closest guide or the runtime section in Runtimes. 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