Skip to content

Deployments

A Deployment in Serversinc represents the process of creating or updating the running Container for an Application.
Deployments ensure that your application is running with the latest code, configuration, and container image.


  1. Build or Image Selection

    • For Docker Applications: The deployment uses the image you provide directly.
    • For GitHub Applications: A build process creates a new Docker image (see Builds).
  2. Container Creation

    • Serversinc launches new containers from the image.
    • Containers inherit environment variables, volumes, labels, and port mappings defined at the Application level.
  3. Traefik Integration (if domains are configured)

    • Deployment ensures Traefik labels are applied for routing and SSL.
  4. Old Containers Removed

    • After new containers are healthy, old containers are stopped and removed (zero-downtime deploys are supported if Traefik is handling routing).

For GitHub Applications, a deployment begins with a Build.

Builds use a Buildpack Docker container:

  • The Buildpack inspects the repository to detect the project’s language/framework.
  • It automatically compiles source code, installs dependencies, and packages the app into a Docker image.
  • Once built, the Docker image is tagged and stored locally on the server.
  • The build process then triggers a Deploy using the new image.

Read more: Buildpacks

  1. Push new code to GitHub.
  2. Serversinc receives the webhook and starts a build.
  3. Buildpack generates a Docker image from your repo.
  4. A new Deployment is created using that image.
  5. Application containers are updated with the new code.

Note: Builds run on the same server where the Application is deployed.


Every deployment goes through states:

  • Created – Deployment object created.
  • Started – Deployment process has begun.
  • Succeeded – New containers are running successfully.
  • Failed – Deployment encountered an error (image build failure, container startup issues, etc.).

Applications expose a Deploy Hook endpoint that can be used to trigger a deployment externally (e.g., from CI/CD pipelines).

Endpoint

POST /v1/events/{deploy_hook}
**Headers**
X-Deploy-Secret: <your_application_deploy_secret>

Both the deploy_hook and the X-Deploy-Secret can be found in Application > Settings.

You can optionally pass a tag value in the request body or query string:

{
"tag": "v2.0.1"
}

This updates the Application’s image tag. If the image:tag does not exist on the server, Serversinc automatically pulls it before starting the deployment.

Notifications

Deployment events are available for alerts via Notifications:

  • deployment.created – A new deployment was created.
  • deployment.started – Deployment process started.
  • deployment.deleted – Deployment was deleted.
  • deployment.failed – Deployment failed.
  • deployment.succeeded – Deployment completed successfully.