Skip to main content

Overview

When you click Deploy, Ardor takes your code, builds a Docker image, and runs it in a production environment. This page explains what happens under the hood and how to manage your deployments.
Cerebrum handles deployments. Just ask “deploy to production” or “roll back to previous version”. The details below help you understand the process or troubleshoot issues.
Deployments are separate from your dev container. The dev container is for testing and iteration; deployments are for production-ready services.

How Deployment Works

1

Build

Ardor reads your Dockerfile and builds a container image. Dependencies are installed, code is compiled, and everything is packaged.
2

Push

The built image is pushed to Ardor’s internal registry, tagged with a unique version identifier.
3

Deploy

A new container is started with your image, configured resources, and environment variables.
4

Health Check

Ardor verifies your service is responding. Once healthy, traffic is routed to the new deployment.

Dockerfile Requirements

All services (except Docker image deployments) need a Dockerfile in the project root.

Dockerfile Essentials

Your Dockerfile must:
  • Build your app — install dependencies, compile code
  • EXPOSE a port — the port your app listens on
  • Define CMD or ENTRYPOINT — how to start your app

Example Dockerfiles

FROM python:3.12-slim

WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 8080
CMD ["python", "app.py"]
Use multi-stage builds (like the Go example) to keep your final image small. Smaller images = faster deployments.

Docker Image Deployments

Services created from Docker images skip the build step entirely — Ardor pulls the image directly and deploys it.

Docker Image Guide

Learn how to deploy pre-built images from Docker Hub.

Triggering Deployments

Manual Deploy

Click the Deploy button in the Canvas or service settings. Use this when:
  • You’ve made changes in the dev container and want to go live
  • You’ve updated environment variables
  • You want to restart the service with fresh state

Auto-Deploy (GitHub)

Services connected to GitHub can deploy automatically when you push to a branch.

GitHub Integration

Set up automatic deployments from your repositories.

Deployment Environments

Ardor supports multiple environments for your services:
EnvironmentPurpose
DevelopmentFor building and testing with Cerebrum
StagingPre-production validation
ProductionLive, user-facing deployment
Each environment has its own URL, resources, and environment variables. You can promote deployments from staging to production.

Deployment Status

Track your deployment in the Deployments tab:
StatusMeaning
BuildingDocker image is being built
PushingImage is uploading to registry
DeployingContainer is starting
RunningService is live and healthy
FailedSomething went wrong — check logs

Build Failures

If your build fails, check:
Typos, missing commands, or invalid instructions. Validate your Dockerfile locally with docker build .
Package not found? Make sure your requirements.txt, package.json, or equivalent is complete and committed.
Some packages need network access. If using a private package registry, ensure credentials are configured.
Large builds (especially Node.js) can run out of memory. Try optimizing your Dockerfile or increasing build resources.

Build Logs

Check build logs for detailed error messages.

Deployment Failures

If your container starts but then fails:
Check runtime logs for errors. Common causes: missing environment variables, database connection failures, port binding issues.
Your app isn’t responding on the configured port. Make sure it binds to 0.0.0.0 and reads the PORT environment variable.
Your app needs more RAM than allocated. Increase memory in resource settings.

Rollbacks

Need to go back to a previous version?
  1. Go to Deployments tab
  2. Find the previous working deployment
  3. Click Redeploy
Ardor keeps your deployment history, so you can always roll back to a known-good state.
Rollback restores the previous code/image, but uses current environment variables. If you changed a variable that broke things, you’ll need to fix that too.

Zero-Downtime Deployments

Ardor uses rolling deployments by default:
  1. New container starts alongside the old one
  2. Health check passes
  3. Traffic shifts to new container
  4. Old container is stopped
This means your users experience no interruption during deployments.

Best Practices

Keep images small

Use alpine base images and multi-stage builds. Faster builds, faster deploys.

Add health endpoints

Implement /health or /healthz endpoints so Ardor can verify your service is working.

Test in dev first

Always validate changes in the dev container before deploying to production.

Use specific versions

Pin dependency versions in your Dockerfile and package files for reproducible builds.

What’s Next