Services Overview

Preview Your Applications with CTO.ai Services

CTO.ai Services provide you with a pre-configured deployment target for your CTO.ai Commands and Pipelines—and any long-running services that your Commands and Pipelines depend on. Services are deployed as lightweight, long-running containers (with ephemeral, non-persistent storage) on our platform, and allow you to serve a web application or API to the public internet over HTTP.

What is a Service?

Each Service is a containerized application that runs on our platform. A minimal Service comprises a Dockerfile, to define how the application container image will be built; an ops.yml configuration file, to define the built container’s runtime environment; and your code—the application and any dependencies required to run it.

When Services are deployed to our platform, they are completely decoupled from any other Services running on our platform and any applications deployed by your Commands or Pipelines. The long-running processes of a CTO.ai Service can be used to:

  • Host a static website
  • Build and preview the changes to a web application on every commit and push to a Git repository
  • Deploy an internal API to offload complex data processing logic from your application code
  • Deploy your application behind a load balancer for truly continuous deployment
  • Run background processes that support the functionality of your Commands and Pipelines

Using Services

If you plan to deploy your containerized application as a CTO.ai Service, there are a few things to keep in mind about the environment in which your application will run.

Storage and Databases

Containers deployed as CTO.ai Services do not have persistent storage. Any data written to the container’s writeable filesystem will be lost when the container is stopped. If your application requires persistent storage or databases, we recommend you configure your application to point to external storage or database system.

Subdomains

By default, deployed Services will be assigned a unique subdomain based on the UUID of the deployment. The application deployed by the Service will be accessible at that unique URL, via the port specified in the ops.yml configuration file for the service. However, it is also possible to configure a custom domain for your Service.