← Back to blog

Published on

How do you put a Docker application into production without configuring a server?

Push the image to a registry and create the project on a platform that runs containers for you (PaaS): you provide the image, the port, and the variables, and the platform handles the operating system, HTTPS, load balancing, and logs. On Zenifra, a 512 MB application with managed PostgreSQL costs R$ 41.80 per month in reais, and this guide shows the Dockerfile, the step by step, and a cost comparison with Render, Railway, Fly.io, DigitalOcean, and Hetzner, using sources from November 6, 2026.

The short answer: image in a registry, platform instead of a server

To put a Docker application into production without configuring a server, push the image to a registry, such as Docker Hub or GitHub Container Registry, and create the project on a platform as a service (PaaS), entering the image, the port the process listens on, and the environment variables. The platform pulls the image, starts the container, gives you an HTTPS URL, and takes care of the operating system, load balancing, and logs.

On Zenifra this flow is called OCI image deploy: the project accepts a public image or one from a private registry, port, variables, plan, number of instances, and storage, and every public HTTP project gets a project-name.clients.zenifra.com subdomain with HTTPS. An application on the Basic plan (0.5 vCPU and 512 MB) with a DB-Starter managed PostgreSQL costs R$ 29.90 + R$ 11.90 = R$ 41.80 per month, in reais, paid by PIX, boleto, or card.

Without configuring a server does not mean without responsibility. You still own the image: its dependencies, language updates, what runs inside the container, and how the application behaves when it restarts. What leaves your list is the machine around it. The sections below show that split in detail, a production-ready Dockerfile in Node.js and Python, the connection to managed PostgreSQL, how to update the image, and what it costs on each alternative.

Competitor prices were read on the official pages on November 6, 2026. Dollar values use the PTAX selling rate of November 5, 2026 (R$ 5.4621) and euro values the euro PTAX selling rate on the same day (R$ 6.1323), both from the Central Bank of Brazil, plus the 3.5% IOF tax on international card purchases (Decree 6,306/2007, art. 15-B, item VII, as amended by Decree 12,499/2025).

VPS with Docker or PaaS: what stays with you in each case

A VPS is a virtual machine: the provider gives you CPU, memory, disk, and an IP, and the rest is yours. Running Docker on it is simple on day one (install Docker Engine, bring up a docker compose stack, open port 80), but every production item becomes a recurring task: updating the system and rebooting when the kernel changes, renewing certificates, setting up a reverse proxy, backing up the database and testing the restore, installing monitoring, and finding out the disk is full before your customer does.

On a PaaS, those items belong to the platform. The table compares what each side maintains for a web application with a database. It does not say a VPS is worse: it says what you need to know how to do and have time to do. For someone comfortable running Linux with a stable application, a well-kept VPS can be the cheapest option. For someone who wants to spend time on the product, the hours usually weigh more than the price difference.

Production itemVPS with DockerZenifra (PaaS)
Operating system and security patchesYou install, update, and reboot the machineThe platform maintains it; you only update the application image
Docker Engine and orchestrationYou install and update Docker, Compose, or another orchestratorThe platform pulls the image and starts the container
HTTPS and certificatesYou set up and renew certificatesSubdomain with HTTPS included; on your own domain, the certificate is issued automatically after DNS validates
Reverse proxy and load balancingYou configure Nginx, Caddy, or TraefikLoad balancing across instances included; HTTPS is terminated before the request reaches the application
Database and backupsYou install PostgreSQL, schedule backups, and test restores, or buy a managed database separatelyManaged PostgreSQL with TLS and automatic backups (every 24 hours with 7-day retention on DB-Starter)
Logs and metricsYou install and maintain collectionLogs on every plan; CPU, memory, and HTTP traffic from the Premium plan up
Failure recoveryYou set up restarts and alertsHealth check every 60 seconds that restarts the instance, from the Premium plan up
ScalingResize the VPS or build another machineMore instances in the Console or CLI, and HTTP auto-scaling on paid plans
Network and attacksYou configure the firewallDDoS protection included; IP blocking from Premium Plus up

The items in the Zenifra column come from the public plan catalog and from the observability, scaling, domains, and database pages of the documentation. Coverage depends on the plan: every plan has logs; Static and Basic have auto-scaling; metrics and health checks start at Premium.

How Zenifra deploys a Docker image

The documentation lists what the image needs: a long-running HTTP process, listening on 0.0.0.0, on the same port configured in the project, taking its configuration from environment variables, and starting without depending on files outside the image or the configured volume. Official images work without changes, including those that run as root and listen on low ports: docker.io/nginx:alpine works with the project port set to 80.

The Console steps are these, taken from the OCI image deploy documentation. After creating the project, follow the logs to confirm the application came up on the expected port; if the image download fails, the project page shows a warning with the reason.

  • 1. Click Create project in the side menu.
  • 2. In Project Source, choose OCI Image.
  • 3. Enter the image, for example ghcr.io/acme/api:1.4.2.
  • 4. In Public Image, choose Yes or, for a private image, No and fill in the Authentication Type.
  • 5. Configure the application port.
  • 6. Add the environment variables.
  • 7. Choose plan, instances, and storage.
  • 8. Create the project and follow the logs.

For a private image, Zenifra accepts two authentication types: AWS ECR (AWS region, Access Key ID, Secret Access Key, and Account ID) or Username and Token for registries that use basic authentication or an access token. Plan this before creating the project: the authentication type is set at creation and should not be treated as editable, and a public image stays public, just as a private one stays private. Use a token with minimal scope, pull only, and never commit the credential to the repository.

To validate the release, the documentation suggests checking that the *.clients.zenifra.com URL responds, that the /health route returns success, that the logs show no startup error, and that DATABASE_URL and the other variables are set. After the first healthy deploy, point your own domain: up to 20 domains per project, with a CNAME for subdomains and an A record for the root domain, always using the values the Console shows.

A production Dockerfile: the rules that make a difference

Use a multi-stage build. The first stage has the compiler, package manager, and development dependencies; the last one receives only what the application needs to run. The final image is smaller, pulls faster on every deploy, and has fewer packages that can carry vulnerabilities. Add a .dockerignore that excludes node_modules, .git, .env files, and test artifacts so none of that enters the build context.

Run as an unprivileged user. On Zenifra this is a good practice, not a requirement, and the documentation is clear that images running as root work. Still, a compromised process inside a non-root container has less it can do. If the application needs to write files, give the user permission on the right folder or use /tmp; permission denied when writing is the most common symptom of this change.

Read the port from an environment variable, with a default equal to the project’s Port field, and listen on 0.0.0.0, never on localhost. Every setting that changes between environments, such as the database URL, API keys, and domain, comes in through variables, not the image. On Zenifra, saving a variable restarts the instances to load the new value; the API accepts up to 50 variables per project, with names up to 120 characters and values up to 32,760.

Build for linux/amd64 and tag every version with a fixed tag, such as 1.4.2 or the commit SHA, never latest. On an Apple Silicon Mac, without --platform linux/amd64 Docker produces an ARM image, which does not start on Zenifra and shows up as exec format error. Expose a /health route that answers 2xx quickly and without heavy queries: it serves the platform health check from the Premium plan up and lets you validate each deploy. Before publishing, test the image locally with the same variables as the project, as in the documentation: docker run --rm -p 8080:8080 -e PORT=8080 ghcr.io/your-org/my-api:1.0.0 and curl http://localhost:8080/health.

Dockerfile examples for Node.js and Python

The Node.js Dockerfile below installs only production dependencies in a separate stage and runs as the node user, which already exists in the official image. The server should listen on the port from the PORT variable, with 8080 as the default; in Express, for example: app.listen(Number(process.env.PORT) || 8080, "0.0.0.0"). Set the project’s Port field to 8080.

For Python the pattern is the same: one stage creates a virtual environment with the requirements.txt dependencies, and the final image copies only that environment and the code. With the Console URI, drivers such as psycopg[binary] connect with TLS with no extra package or variable in the image. The second example below shows the Python Dockerfile.

In the main.py of a FastAPI app, start uvicorn reading the port from the variable and trusting the proxy headers, because Zenifra terminates HTTPS before forwarding the request and, without this, generated URLs come out as http, as in the third example below. Set the Port field to 8000. If you do not need to control the image, Node.js and Python can also be deployed straight from a Git repository, without a Dockerfile.

dockerfile
FROM node:22-alpine AS deps
WORKDIR /build
COPY package.json package-lock.json ./
RUN npm ci --omit=dev

FROM node:22-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
COPY --from=deps /build/node_modules ./node_modules
COPY . .
USER node
EXPOSE 8080
CMD ["node", "server.js"]
dockerfile
FROM python:3.13-slim AS build
WORKDIR /build
COPY requirements.txt .
RUN python -m venv /venv && /venv/bin/pip install --no-cache-dir -r requirements.txt

FROM python:3.13-slim AS runtime
RUN useradd --system --uid 10001 app
WORKDIR /app
COPY --from=build /venv /venv
COPY . .
ENV PATH=/venv/bin:$PATH
USER 10001
EXPOSE 8000
CMD ["python", "main.py"]
python
if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", "8000")), proxy_headers=True, forwarded_allow_ips="*")

Connecting to managed PostgreSQL

Create the database as another project in the same organization. DB-Starter has 0.3 vCPU and 256 MB, PostgreSQL 18 by default (versions 15, 16, 17, and 18 are available), storage set at creation, automatic backups every 24 hours with 7-day retention, and can grow from one to six instances. Disk is billed separately, at R$ 0.20 per GB per month.

The connection follows three steps from the documentation: open the database in the Console and copy the connection URI (the full password is shown only at creation or after a rotation); in the application project, create the DATABASE_URL variable with that URI; and always use the host shown in the Console, in the postgresql-<id>.managed.zenifra.com format, because the certificate is issued for that name and connections through the IP fail verification.

The URI ends with sslmode=require, which turns TLS on. It works unchanged in the common drivers, with no environment variable. Do not switch it to sslmode=disable: the database requires TLS by default and refuses unencrypted connections.

  • Node.js with pg (node-postgres): use the Console URI as is.
  • Node.js with postgres.js: use the Console URI as is.
  • Python with psycopg or psycopg2 (binary packages): use the Console URI as is.
  • Python with asyncpg: use the Console URI as is.
  • Laravel: use the Console URI in DB_URL instead of DB_HOST and the separate variables.

Migrations deserve extra care when the application runs in a container: rolling back the application does not undo database changes. The rollback documentation recommends testing migrations in a separate environment, preferring migrations compatible with two versions of the application, and avoiding a release whose code depends on a destructive migration in the same deploy.

Update the image, roll back a version, and automate

In a project with an image source, a new version is released by changing the image. The flow is: build the new image in your pipeline, push the tag to the registry, change the project image, and validate logs, the public URL, and, on plans with metrics, resource usage. The change can be made in the Console, through the API, through the GitHub Action, or with the CLI, in one command: zenifra project image set --project <id> --image ghcr.io/your-org/my-api:1.0.1. When the image changes, the instance may restart.

Rolling back is the same command with the previous tag. If 1.4.3 broke, publish 1.4.2 again and validate logs, metrics, the /health route, and the main behavior. That is why the documentation insists on immutable tags: with latest, there is no previous version to point to.

To automate, the GitHub Actions documentation sets up the full flow for projects with an image source: the workflow builds the image, pushes it to the registry, and updates the project on Zenifra, triggered by version tags. It uses four repository secrets (OCI_USERNAME, OCI_PASSWORD, ZENIFRA_PROJECT_ID, and ZENIFRA_API_KEY) and an API key with the project.image.update permission on the project, plus project.read and project.logs.read to follow the result.

Logs, metrics, health checks, and auto-scaling

Application logs are available on every plan and arrive live in the Console, in about 1 second, while the logs card is open. To keep them, turn on Log history for the HTTP project: the files stay in your organization’s Armazém for 7, 30 or 90 days, and the Logs page searches every project at once. With the CLI, zenifra project logs --project <id> --instance <instance-id> shows an instance’s output.

From the Premium plan up, the Console shows CPU, memory, HTTP requests, network traffic, status distribution, top routes, main user agents, and P95 latency when available, with network data kept for up to 7 days. The health check comes with the same plan: Zenifra calls the configured route every 60 seconds, with a 5-second timeout and a 30-second initial delay, treats only 2xx responses as healthy, and restarts the instance when a failure is confirmed; failures are listed for 30 days.

To scale, you can raise instances manually in the Instances section of Edit project or with zenifra project instances set, and multiple instances get load balancing from the platform. Every paid HTTP plan has HTTP auto-scaling, with a reserved minimum, a maximum for peaks, and CPU and memory targets; each scaling event stays in the Auto-scaling history for about 13 months. Manual instance changes and plan changes apply to hourly billing; on monthly and yearly contracts, the reserved minimum is part of the contract and instances above it are billed as elastic instance-hours.

PlanvCPURAMMonthlyHourlyAuto-scalingMetrics and health check
Static0.1128 MBR$ 5.90R$ 0.01YesNo
Basic0.5512 MBR$ 29.90R$ 0.05YesNo
Premium11 GBR$ 62.90R$ 0.11YesYes
Premium Plus22 GBR$ 119.90R$ 0.22YesYes, with IP blocking
Business88 GBR$ 479.90R$ 0.86YesYes, with IP blocking

Values are from the public HTTP plan catalog on November 6, 2026. With hourly billing, the project’s total hours in the cycle are rounded up to the full hour.

Monthly cost: Zenifra, Render, Railway, Fly.io, and VPS

The scenario is a small always-on web application with about 512 MB of memory and a small PostgreSQL. For each provider we used the smallest official plan that fits this design and listed what is included. Database disk, outbound traffic, and usage-based CPU are left out of the totals and appear in the notes column, because each provider bills those items differently.

For the VPS options, the price is for the machine only: PostgreSQL runs on it and is yours to manage, or you buy the same provider’s managed database. The DigitalOcean row with a managed database shows what it costs to take that work off your plate at the same provider.

OptionWhat is includedOfficial priceConvertedWith 3.5% IOFNotes
Zenifra Basic + DB-Starter0.5 vCPU and 512 MB + PostgreSQL 0.3 vCPU and 256 MBR$ 41.80Not applicableR$ 41.80, no IOFHTTPS, subdomain, DDoS protection, auto-scaling, and daily database backup
Render (Hobby workspace)Web service 0.5c-512mb + Postgres 0.1c-256mbUS$ 13.00R$ 71.01R$ 73.49Postgres disk at US$ 0.30 per GB; horizontal autoscaling is on the Pro workspace, US$ 25 per month
Railway Hobby0.5 GB of RAM for the application and 0.5 GB for the database, by usageFrom US$ 10.00, plus CPUFrom R$ 54.62From R$ 56.53CPU at US$ 20 per vCPU per month; the US$ 5 subscription becomes usage credit
Fly.ioshared-cpu-1x 512MB Machine + Managed Postgres BasicUS$ 41.69R$ 227.71R$ 235.68Ashburn (iad) prices; Postgres disk at US$ 0.28 per GB; has a São Paulo region (gru)
DigitalOcean Droplet1 vCPU, 1 GiB, 25 GiB SSD, and 1,000 GiB of transfer; PostgreSQL is yours to runUS$ 6.00R$ 32.77R$ 33.92Droplet backups cost 20% (weekly) or 30% (daily) of the machine price
DigitalOcean Droplet + managed PostgreSQL1 GiB Droplet + 1 GiB PostgreSQLUS$ 21.15R$ 115.52R$ 119.57The Droplet OS, Docker, and proxy are still yours
Hetzner Cloud CPX121 vCPU, 2 GB, 40 GB NVMe in the European Union; PostgreSQL is yours to run€ 11.99, excl. VATR$ 73.53R$ 76.10CPX02 (1 GB, € 6.49) was listed as unavailable on November 6, 2026

An honest reading: if you already run Linux and only need a machine, the US$ 6 Droplet comes to R$ 33.92 with IOF, less than the Zenifra Basic scenario, and Hetzner gives you more memory for the price. The difference is in the column of what you maintain: the system, certificates, backups, and monitoring go on your calendar. Once the database is managed too, DigitalOcean goes up to R$ 119.57.

Among the PaaS options, Railway is close to Zenifra before CPU is counted, and Render charges US$ 13 for its smallest paid plans. Fly.io has the cheapest machine in the comparison (US$ 3.69 for 512 MB) and a São Paulo region, but Managed Postgres starts at US$ 38 a month, which dominates the total. On Zenifra the bill is in reais, with no exchange rate and no IOF, and the cheapest application scenario with a database, Basic with DB-Starter, costs R$ 41.80.

What is the best platform to deploy a Docker application without configuring a server?

It depends on where your users are and how you want to pay. For a product with customers in Brazil, a platform with infrastructure in Brazil and billing in reais makes sense, such as Zenifra, which deploys the image with HTTPS, a domain, a managed database, and logs from R$ 41.80 per month with PostgreSQL.

If your audience is global and you already pay in dollars, Render, Railway, and Fly.io are solid options, and Fly.io lets you run the same image in several regions, including São Paulo. If the team has Linux experience and the application is stable, a VPS is the cheapest option per resource, as long as someone takes care of maintenance.

Do I need a Dockerfile to deploy on Zenifra?

No. Node.js, Python, Bun, Go, Java, and PHP applications can be deployed straight from a GitHub or Forgejo repository, and Zenifra runs the build. A Dockerfile is for when you want to control the image, already have a pipeline that produces images, or use a language outside those runtimes, such as .NET.

A project created from an image can also switch to a repository later: the Git repository section of the project page connects a repository, and the next versions are built from the code. The reverse does not apply: projects with a Git source do not switch to an OCI image later.

My image runs as root or on port 80. Does it work?

Yes. Images that run as root and listen on low ports, such as docker.io/nginx:alpine on port 80, work normally; just set the project’s Port field to the port the image exposes.

Running as an unprivileged user is still recommended for security, and the documentation’s reference Dockerfiles do that. If the image does not start, the usual suspects are elsewhere: exec format error points to an ARM image (build with --platform linux/amd64), and a container that starts and crashes usually has a port different from the configured one or a missing variable.

How do I use an image from a private registry?

When creating the project, choose No in Public Image and fill in the Authentication Type: AWS, for images on Amazon ECR, or Username and Token, for registries such as GitHub Container Registry, GitLab, or Docker Hub with an access token. The credential lives in the Console, never in the repository.

Decide this carefully, because the authentication type should not be treated as editable after creation and switching from private to public is not guaranteed. If the pull fails, check the URL, tag, repository name, and token scope: access denied is almost always a token without pull permission.

Can I host a Docker application with a managed database and pay in reais?

Yes. On Zenifra, the application and the managed PostgreSQL are billed in reais, by PIX, boleto, or card, with no IOF, on infrastructure in Brazil. The application on Basic with PostgreSQL on DB-Starter costs R$ 41.80 per month, plus database disk.

Sign-up requires a Brazilian CPF or CNPJ, a mobile number, and an address in Brazil. For a paid project, the smallest application scenario with a database is Basic with DB-Starter, with a 512 MB application, R$ 41.80 per month. Besides PostgreSQL, managed MariaDB and Valkey are available in the same Console.

Simulate a Basic app with DB-Starter in the calculator

We respect your privacy

We use essential cookies to run this site. Measurement and marketing cookies, such as Google Ads, are only enabled when you accept all cookies. Read our cookie policy.