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:
| Path | When to use | Languages |
|---|---|---|
| Git repository (GitHub, GitLab, or Forgejo) | You want Zenifra to install dependencies, build, and deploy on every change | Node.js, Python, Bun, Go, Java, and PHP |
| 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, 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
| Framework | Path | Suggested port | Build | Start |
|---|---|---|---|---|
| Next.js | Git · Node.js | 3000 | npm run build | npx next start -H 0.0.0.0 -p 3000 |
| Express / Fastify | Git · Node.js | 3000 | empty or npm run build | node index.js |
| NestJS | Git · Node.js | 3000 | npm run build | node dist/main.js |
| Vite, React, Vue, static Astro | Git · Node.js or OCI | 3000 / 80 | npm run build | npx serve -s dist -l tcp://0.0.0.0:3000 |
| FastAPI | Git · Python | 8000 | empty | uvicorn main:app --host 0.0.0.0 --port 8000 |
| Flask | Git · Python | 8000 | empty | gunicorn app:app --bind 0.0.0.0:8000 |
| Django | Git · Python | 8000 | python manage.py collectstatic --noinput | gunicorn config.wsgi --bind 0.0.0.0:8000 |
| Go | Git · Go | 8080 | go build -o app . | ./app |
| Spring Boot (Maven) | Git · Java | 8080 | mvn -B -DskipTests package | java -jar target/*.jar |
| Laravel | Git · PHP | 8080 | empty (with Vite, see the guide) | frankenphp php-server --listen :$PORT --root public/ |
| Symfony | Git · PHP | 8080 | empty | frankenphp php-server --listen :$PORT --root public/ |
| 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 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.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
Quickstart — With Database
Publish a Node.js app connected to a Zenifra managed PostgreSQL database, over TLS, with a manually set DATABASE_URL, and its connection and write tests.
Deploy Next.js on Zenifra
Deploy Next.js on Zenifra from GitHub, GitLab, or Forgejo: build and start commands, NEXT_PUBLIC variables, health check, Prisma or Drizzle and common errors.