Skip to main content

Deployment

How the images get onto the server described in Servers and hosting and stay running. Two paths — the recommended one, and the one with nothing between you and Docker.

Dokploy is an open-source deployment platform that runs on your own server and drives Docker for you: it takes the repository's docker-compose.yml as a single Compose service, provisions TLS certificates, routes each domain to its container, and redeploys on every push to the deploy branch — the push is the deploy, there is no separate step.

It is how production is deployed: the six deployables plus MinIO run as one Dokploy Compose service, with MongoDB on its own server reached through MONGO_URI. Being open source, it adds no licensing cost and no vendor lock-in.

For installation and everything else it can do, see the official documentation: docs.dokploy.com.

Without Dokploy: plain Docker​

Dokploy is a convenience, not a dependency. The platform's deployment contract is docker-compose.yml plus the environment reference, so any host with Docker Engine runs it directly:

docker compose up -d

What Dokploy would have handled — TLS termination, domain routing, redeploying on new versions — becomes yours, typically a reverse proxy (nginx, Caddy, Traefik) in front of the compose stack. Self-hosting is the ordered path: build the images, fill in the environment, first run.

Domain naming​

Once the environment is configured, each public-facing service needs a hostname. The platform does not require any particular one, but it derives sibling origins from the site's — so the naming below is the recommended standard, and it is what our own deployments use.

One pattern covers every service and every environment:

[<environment>-]<platform>[-<service>].<domain>
  • The site takes the bare stem — it is the deployment's public face, so it carries no service label.
  • Every other service appends -<service> to the first label, never a new subdomain level: sportsbook-api, not api.sportsbook.
  • Production drops the environment prefix. Any other environment prefixes its name to the same stem, which is what lets two environments live on one registered domain without colliding.
ServiceProductionDevelopContainer port
sitesportsbook.example.comdevelop-sportsbook.example.com3002
apisportsbook-api.example.comdevelop-sportsbook-api.example.com3000
adminsportsbook-admin.example.comdevelop-sportsbook-admin.example.com3100
cdnsportsbook-cdn.example.comdevelop-sportsbook-cdn.example.com80
docssportsbook-docs.example.comdevelop-sportsbook-docs.example.com80

<platform> is yours to choose — it is the stem you registered the domain for, sportsbook here only because that is what these examples deploy. Whatever it is, PUBLIC_DOMAIN is the site's hostname, the first row of the table, and the rest of the column is derived from it.

Two things in the platform read that derivation, which is why the pattern is worth following rather than inventing one per deployment:

  • The back-office derives its own public origin by inserting -admin into the first label of PUBLIC_DOMAIN. Password-reset links are built from it — never from the request's Host, which is spoofable. A hostname that does not conform still works, but it must then be stated outright in ADMIN_PUBLIC_URL.
  • The widget's zero-config embed asks the cdn host for the API origin, and the cdn derives it by swapping cdn for api in its own hostname. An operator's page then embeds the widget without being told an endpoint.

One back-office per client​

Every operator registered from the platform's back-office gets a back-office of its own at <slug>-<admin host> — cliente-1-sportsbook-admin.example.com when the admin is sportsbook-admin.example.com — backed by a database of its own (sb-<slug>) on the platform's MongoDB server.

That subdomain is not an alias for the platform's own login screen — it opens a genuinely separate one. An operator's administrators sign in there with accounts of their own, created for that operator alone: an account made for one operator is not visible from any other operator's address, and not from the platform's own.

The platform creates the Dokploy domain row for the subdomain when these three are set on the admin service:

VariableValue
DOKPLOY_URLThe panel's base URL.
DOKPLOY_API_KEYAn API key with domain rights (Settings → Profile → API/CLI Keys).
DOKPLOY_COMPOSE_IDThe compose service id, from the service URL in the panel.

Two things stay yours: the DNS — one wildcard record so every *-<admin host> resolves to the same origin — and, with the three unset, the domain rows themselves, which the panel's Domains tab accepts by hand.

On Dokploy, add one entry per service on the compose service's Domains tab with the container port from the table, HTTPS and Let's Encrypt; deploying without it, the same hostnames become the reverse proxy's server names. Either way the DNS side is one A record per hostname, pointing at the application server.