logoComputeSphere
Deployment

How to Deploy a Docker Container on ComputeSphere

P
By Peter Ekhator
•2 min read•

If your app already builds into a Docker image, ComputeSphere runs that image as-is: point csph deploy --image at your registry, set the port, and you have a live HTTPS service. No buildpack, no Procfile and no framework-specific setup. This guide deploys an existing image, then adds environment variables, a custom domain and autoscaling.

Before you start

  • A Docker image (or a Dockerfile that builds one)
  • A registry to push to — Docker Hub, GHCR, Quay, or a private registry
  • A ComputeSphere account — a 14-day trial; a card is required to start, and you're charged from day 15 unless you cancel

Install the csph CLI

brew install computesphere/cli/csph
# or
npm install -g @computesphere/csph

Then sign in:

csph auth login

Build and push your image

Build, tag, and push to your registry:

docker build -t my-app:1.0.0 .
docker tag my-app:1.0.0 registry.example.com/my-app:1.0.0
docker push registry.example.com/my-app:1.0.0

Deploy the image

Deploy what you just pushed:

csph deploy --image registry.example.com/my-app:1.0.0

ComputeSphere pulls the image, runs it on a spherelet, terminates TLS, and returns a public URL:

https://copper-lynx.computesphere.app

Specify the port your container listens on. For a private registry, add your credentials in the Console first, then deploy.

No image yet? Build and deploy in one step

If you have a Dockerfile but haven't pushed an image, run csph deploy from the project directory instead — ComputeSphere builds the image and deploys it in a single step.

Set environment variables

Pass config and secrets to your container at runtime:

csph services variables set LOG_LEVEL=info --service <service-id> --environment <environment-id>
csph services secrets set DATABASE_URL="$DATABASE_URL" --service <service-id> --environment <environment-id>

csph services list shows the service id and csph environments list the environment id.

Set DATABASE_URL in your shell first, for example from a file or your password manager, so the secret itself never appears in the command or your shell history.

Add a custom domain

Open Console → Domains, add your hostname, and create the CNAME it shows pointing to your service URL:

Type    Name    Value
CNAME   app     copper-lynx.computesphere.app

ComputeSphere issues and auto-renews the SSL certificate for you.

Scale with spherelets

A spherelet is your unit of compute, and you pay a fixed price per spherelet. There are no per-seat fees, and every plan includes data out each month (10 GB to 1,000 GB, by plan). Pick a size (Flex, Standard, or Plus), run as many spherelets as you need, and turn on autoscaling with a minimum, a maximum, and a target CPU. Autoscaling is a Team plan feature; on Hobby and Pro you set the spherelet count yourself.

Your container is in production

Your image now runs on ComputeSphere as you built it, with HTTPS, its config in variables and secrets, and your own domain. Any container that runs locally runs the same way.

Next step: get started and run csph deploy from your project, or book a 15-minute demo.

Predictable cloud, from your first push.

Fixed price per spherelet, flat plan per team — ship without DevOps or surprise bills.

Start free trial

14-day free trial

Share this article

Ship your next service on ComputeSphere

Predictable per-spherelet pricing, a flat plan per team, and managed primitives built in — no DevOps, no surprise bills.

Deploy your first app in minutes.

Connect a repo or start from a template — live URL, SSL, and zero DevOps, on predictable monthly pricing. 14-day free trial.