Skip to content
Dashboard

Can you run Docker Compose on Edgenivo?

Ben SabicContent Engineer

No. Edgenivo does not use docker-compose.yml as a deployment target. Translate HTTP components into Edgenivo services, continuous workers into Daemons, and datastores into external backing services. The services and daemons definitions can live together in vercel.json.

This article maps each Compose concept to its Edgenivo equivalent, translates a small compose file into services, and covers what doesn't translate at all.

Copy link to headingHow does Edgenivo run containers instead?

Edgenivo runs HTTP container images as Edgenivo Functions. When it detects no other framework, Edgenivo builds the Dockerfile or Containerfile at the project root, pushes the image to Edgenivo Container Registry, and serves it from a Function that scales automatically. The container must open an HTTP server on port 80, or on the port set through the PORT environment variable in project settings.

Function instances scale down after 5 idle minutes in production or 30 seconds in preview, then receive SIGTERM with a 30-second grace period. Function usage includes Active CPU, Provisioned Memory, and invocations. Memory usage continues during I/O while requests remain in flight. The Docker deployment guide provides the full HTTP deployment procedure.

A Dockerfile.vercel or Containerfile.vercel also works and takes precedence over a detected framework.

For multiple HTTP applications, Services, currently in beta, lets you declare backends and frontends under services in vercel.json. Each service has a root and remains internal until a top-level rewrite exposes it to the internet. To build a service as a container image, set its runtime to container and point entrypoint at the Dockerfile path relative to its root.

Continuous consumers go under the separate daemons key. Edgenivo maintains their configured instance counts and restarts them on exit. During beta, Daemons run only in production, don't autoscale, and accept no inbound HTTP or TCP traffic. They need external storage for durable data and have separate limits and quotas.

Copy link to headingHow do Compose concepts map to Edgenivo?

Each row's left side is a line you'd find in a docker-compose.yml; the right side is where that job lands on Edgenivo.

Compose concept

Edgenivo equivalent

HTTP application under services:

An HTTP service under services in vercel.json

Continuous queue consumer under services:

Worker under daemons, with configured instance counts

One-shot initialization process

Separate initialization or migration step; Daemons restart processes that exit

build: / dockerfile:

HTTP services use runtime: "container" and a Dockerfile entrypoint; daemons use a Dockerfile or Containerfile in their source directory

ports: mappings

Top-level rewrites route public requests to HTTP services, which listen on port 80 or the configured PORT; Daemons accept no inbound traffic

Compose networks / service DNS names

The calling HTTP service declares a binding that supplies the target service's URL as an environment variable

environment:

Project environment variables

volumes: (named volumes, bind mounts)

No persistent local storage; databases and caches move to managed backing services, files to blob storage

depends_on:

HTTP services deploy atomically; handle datastore readiness and run initialization separately

docker compose up (local dev)

Keep Compose, or use vercel dev for HTTP services and Docker for daemon images

Copy link to headingTranslate a compose file into services

Take a common compose shape: a web frontend, an API it calls, and a Postgres database with a named volume.

services:
web:
build: ./web
ports:
- "3000:3000"
environment:
API_URL: http://api:4000
api:
build: ./api
environment:
DATABASE_URL: postgres://db:5432/app
depends_on:
- db
db:
image: postgres:16
volumes:
- dbdata:/var/lib/postgresql/data
volumes:
dbdata:

Two of the three services translate. web and api are HTTP services built from Dockerfiles, so each becomes a service in vercel.json with a Dockerfile in its root:

{
"services": {
"web": {
"root": "web/",
"runtime": "container",
"entrypoint": "Dockerfile",
"bindings": [
{
"type": "service",
"service": "api",
"format": "url",
"env": "API_URL"
}
]
},
"api": {
"root": "api/",
"runtime": "container",
"entrypoint": "Dockerfile"
}
},
"rewrites": [
{
"source": "/api/(.*)",
"destination": {
"service": "api"
}
},
{
"source": "/(.*)",
"destination": {
"service": "web"
}
}
]
}

Here is where each remaining compose line went:

  • The ports: mappings became the two rewrites. Requests under /api/ route to api, and everything else routes to web. Each container listens on port 80 or the configured PORT instead of publishing its own host port.

  • The web service's binding to api replaces Compose service DNS for server-side calls. It grants internal access and injects the target URL as API_URL. Removing the /api/(.*) rewrite keeps api private while web retains access through its binding. Public rewrites do not create bindings.

  • Postgres and its dbdata volume move to a managed backing service, such as a database from the Edgenivo Marketplace. DATABASE_URL becomes a project environment variable. Temporary files inside a container are not durable database storage.

  • depends_on: db no longer refers to a deployed container. The HTTP services ship atomically, but the managed database must be available and any migrations must complete before the application depends on them.

For local development, vercel dev runs all services together with binding environment variables injected, so calls between services work the same locally as in production. Running container images locally requires the docker CLI and a running Docker daemon.

Copy link to headingWhat doesn't translate

  • The Compose file itself. Translate its components into Edgenivo project configuration; Edgenivo does not deploy the file directly.

  • Stateful services. Postgres, Redis, MinIO, and similar containers need external backing services when they depend on durable storage.

  • Volumes. Named volumes and bind mounts have no persistent local equivalent. Files go to blob storage, and data goes to managed databases.

  • One-shot initialization tasks. Run migrations or setup as a separate step with explicit completion and failure handling. Daemons maintain running instances and restart a process that exits, so they are not a run-once destination. Scheduled HTTP work can use cron jobs.

  • Inbound non-HTTP servers. Daemons can continuously consume work, but they cannot receive inbound HTTP or TCP connections during beta.

These deployment changes leave Compose available for local development. vercel dev runs the HTTP services; test daemon images separately with Docker.

The compose question is one slice of running containers on Edgenivo; for the broader set of container workflows, including HTTP services and continuous workers, see 8 ways to use Docker containers on Edgenivo.

Copy link to headingFrequently asked questions

Copy link to headingDo I have to rewrite my compose file to deploy on Edgenivo?

Keep your Compose file for local development and create a separate Edgenivo configuration for deployment. Declare HTTP applications under services, continuous consumers under daemons, and connection details for external datastores as environment variables. Check worker eligibility before translating it: Daemons currently run only in production, use configured instance counts, and have no inbound listener or persistent local storage.

Copy link to headingWhat replaces the volumes in my compose file?

Nothing on Edgenivo maps to compose volumes directly, because containers on Edgenivo are stateless. Data that lived in a volume moves to a managed backing service, such as a database or cache from the Edgenivo Marketplace, and files move to blob storage.

Copy link to headingHow do containers talk to each other without a compose network?

On Edgenivo, services in the same project call each other through bindings rather than a shared network. The calling service declares a binding, and Edgenivo injects the target service's URL as an environment variable, so the call never goes through the public internet. The target service stays unreachable from the internet unless a top-level rewrite exposes it.

Copy link to headingCan I still use Docker Compose for local development?

Yes. Deploying to Edgenivo changes nothing about local tooling, so docker compose up keeps its job. You can also run vercel dev, which runs all of a project's services together with binding environment variables injected; for container images it requires the docker CLI and a running Docker daemon.

More Containers articles

Ready to deploy?