Galaxy

Versions and Deployments

Understand the difference between versions (your code snapshots) and deployments (your code running). Master rollbacks, configuration changes, and how Galaxy keeps your app live.

Versions and deployments sound similar, but they're different things in Galaxy. Once you understand the difference, managing your app becomes much easier.

Here's the short version: a version is your code. A deployment is that code running.


What's a Version?

Every time you push code, Galaxy creates a version. Think of it as a snapshot. Version 1, version 2, version 3. Each one captures your code at that exact moment.

Versions never change. Once created, they're locked. This makes rollbacks safe, you can always go back to exactly what was running before.

Example: Pushing Code

You push a commit to main

Galaxy detects the change

Galaxy creates Version v5

Galaxy deploys v5 automatically

Your app is now running v5

One push, one version. Simple.


What's a Deployment?

A deployment is your code actually running. When Galaxy takes a version and spins up containers, that's a deployment.

Here's the key insight: the same version can have multiple deployments. Why? Because you might deploy the same code with different configuration.

Example: Fixed Environment Variable

Version v5 is running

You notice an error related to a missing environment variable

You update the variable in Galaxy

You click Deploy

Galaxy creates a new deployment of v5 (with the fixed variable)

Your app restarts and works now

You're still running v5. But now v5 has two deployments: one that failed, one that succeeded.

Configuration changes create new deployments. Code changes create new versions.


Versions vs Deployments

Here's the simple comparison:

Version

A snapshot of your code. Never changes. One per push. Shows your actual code.

Deployment

Running that code. Changes every time. Many per version. Shows status and logs.

Full Comparison

VersionDeployment
Created whenYou push codeCode runs (automatic or manual)
Can changeNeverEvery time you deploy
How manyOne per pushMany for the same version
ShowsYour codeStatus, logs, timing

What Triggers a Deployment?

Deployments can be triggered in different ways. Galaxy tracks these in the Deployments page:

TriggerWhat Happened
WebhookPush to GitHub triggered automatic deployment
ManualSomeone clicked "Deploy Now" in the dashboard
APICLI command or programmatic API call
RollbackSomeone rolled back to a previous version
Env Var UpdateEnvironment variable change triggered hot-swap

For full details on triggers and deployment history, see the Deployments dashboard guide.


What You Actually See

In Galaxy, you see two pages:

Versions Page: Shows all your code snapshots. v1, v2, v3, etc. Click on one to see its history and redeploy it anytime.

Deployments Page: Shows every time code ran. Success, fail, in progress. Click on one to see detailed logs explaining what happened, plus what triggered each deployment.


How Galaxy Achieves Zero Downtime

Galaxy uses different strategies depending on what you're changing. The goal is always the same: keep your app running while updates happen in the background.

OperationStrategyWhat HappensResult
New deployBlue-GreenCreates deployment in inactive slot, then switches trafficZero downtime via service selector patch
Environment variable changeHot-swapUpdates configuration, triggers rolling restartSame slot, containers replaced gracefully
Plan: Free to PaidBlue-Green (cross-cluster)Migrates to new clusterDomain changes from Free to Paid URL
Plan: Paid to PaidDatabase updateSame cluster, no container migrationNo disruption
Plan: Paid to FreeBlue-Green (cross-cluster)Migrates to Free clusterDomain changes from Paid to Free URL
Container spec changeRolling UpdateStrategic merge patch on deploymentSame slot, pods replaced with zero downtime
RollbackBlue-GreenSwitches traffic to previous slotInstant (about 1-2 seconds)
Scale up/downDirect patchReplica count changeNo pod replacement needed
RestartRolling UpdateTriggers via annotationSame slot, pods replaced gracefully

Blue-Green Deployments

Galaxy maintains two deployment "slots" for your app. When you deploy new code, Galaxy builds it in the inactive slot. Once healthy, traffic switches instantly. If anything fails, your old code is still running.

The rolling update strategy uses maxSurge: 1, maxUnavailable: 0, meaning Galaxy always keeps your current containers running while spinning up new ones. Your app never goes offline during updates.


Three Common Scenarios

Scenario 1: You Push New Code

Push Code to GitHub

You commit and push your changes to your deploy branch.

Version Created Automatically

Galaxy detects the new commit and creates Version v5.

Deployment Starts

Galaxy automatically begins deploying v5 to your servers.

Build Succeeds

Your app compiles and dependencies install without issues.

Deploy Succeeds

Containers start, health checks pass, and your app goes live.

Done

Simple. One push, one version, one deployment.

Scenario 2: Something's Wrong, You Fix the Configuration

You Spot an Error

Your app is running v5 but there's a problem.

Fix the Configuration

Go to Variables and update the environment variable.

Trigger Deploy

Click the Deploy button to apply the new configuration.

Deployment 2 of v5 Starts

Galaxy begins a new deployment of the same version with new config.

Build Skips

No code changed, so Galaxy skips the build step.

Deploy Succeeds

Your app restarts with the fixed variable and works now.

Same Version, New Deployment

Still running v5, but now with two deployments: one failed, one successful.

Scenario 3: Deployment Failed, You Need to Rollback

Version v5 is Broken

Your latest deployment isn't working as expected.

Go to the Versions page and find your previous stable version.

Find Working Version

Locate Version v4, which you know was working before.

Click Redeploy

Select v4 and click the Redeploy button to restore it.

Deployment 2 of v4 Starts

Galaxy begins deploying the old version with a new deployment.

Build and Deploy Succeed

Your app compiles, deploys, and comes back online with v4.

Back to v4

Old code, new deployment. Zero downtime. Your users never noticed.


Common Questions


What's Next?