Skip to content

Service lifecycle

Service states, when Deploy, Stop and Start apply, the restart warning, and deleting a service.

Updated

A service is one thing Cloud runs: an application, a database or a compose stack. This page follows one from creation to deletion: the states it passes through, the controls that move it between them, and what has to be removed before it can go.

Create a service

On a project, press Add a service and choose what to create: an application from a GitHub repository, a Docker image or a compose file, a database, or an application from the catalogue. Each opens a form that ends with an Order summary of the size and its rate, and Create service.

Creating a service never runs it. The service's own page opens, its chip reads Idle, and nothing is charged until it runs. You read what was made, change the port, the environment or the source if needed, then deploy. The guides for each kind cover their forms: GitHub, Docker image, compose, databases and the catalogue.

States

ChipWhat it meansWhat you can press
IdleCreated and never deployed.Deploy
RunningIts last deployment left it running, or it was started again.Deploy, Stop
StoppedYou stopped it. Configuration and data are kept.Deploy, Start
ErrorIts last deployment ended with nothing running.Deploy, Stop
SuspendedCloud stopped it because your account was suspended.Nothing until the account is active again

The state changes like this:

  • A deployment that ends Done makes the service Running. One that ends Failed makes it Error, and that includes a deployment the engine finished with nothing left running ("The deployment finished, but nothing is running.").

  • After a cancelled deployment, the service reads Running if any of its containers still run. Otherwise it keeps the state it had, except that a service that was Running reads Error.

  • Stop makes it Stopped, and Start makes it Running again.

  • When your account is suspended, each service that was Running or in Error becomes Suspended. Services you had stopped stay Stopped.

  • When the account is active again, each Suspended service is started at its replica count and reads Running.

Deploy

Deploy is in the service's header and on its row in the project's list. Pressing it opens the new deployment's page, where its build log streams. Deployments covers what a deployment does and its statuses.

Deploy is greyed out, with the reason as its tooltip, when:

  • "A deployment of this service is already running": a service runs one deployment at a time. Wait for it to finish, or cancel it from its page.

  • "The service is suspended, so it cannot deploy": the account is suspended. Contact support, as Billing describes.

A deploy can also be refused after you press it, with a message at the bottom of the window. The sentences, from unfinished backup work to a suspended account, are in Deploy is greyed out or refused.

Stop and Start

Stop appears while the service is Running or in Error. It stops every container of the service and keeps its configuration, its environment and its data. A stopped service is not charged, because Cloud charges an hour only for the containers it finds running. Its address answers nothing until it runs again.

Start appears while the service is Stopped. An application comes back at its replica count, a database starts again, and a compose stack is brought up by deploying its file again.

An Idle service has neither: it has never run, so Deploy is the way to start it. A Suspended service has neither either, and every form on its page is read only, with the notice "Read only": "This service is suspended. Its environment and settings cannot be changed, and it cannot be deployed, until it is resumed."

Start is refused while your account is suspended, with "This account is suspended by Cahaves. Contact support to have the suspension lifted." For a paid service it is also refused while paid work is, with one of the sentences Billing lists. Stop and Start are both refused while a backup of the service is still running, with "This service has unfinished backup work."

Visit

Visit appears once an application or a compose stack is Running, and opens it on a domain whose certificate is in place: your own domain before a generated one. A database has no Visit; other services connect to it on its internal address.

When there is no address to open yet, Visit is greyed out and its tooltip says why:

TooltipWhat to do
"Deploy it again and its domain is generated"Deploy the application. A deploy that ends Done gives an application with no domain an address on the platform's domain.
"Add a domain to visit this service"Add one on Domains. A compose stack is never given one automatically.
"Its domain is still being set up"Wait for the domain's chip on Domains to read HTTPS active.
"Its domain needs attention"Open Domains, correct what the card says, and press Check again.

An application's domain sends traffic to the port the service had when the domain was added, and keeps it. After changing Port on Settings, remove the domain and add it again, or, for a generated address, remove it and deploy again. Domains covers both kinds of domain.

When the engine keeps restarting a service

A deployment can end Done and the service read Running while whatever runs in the container keeps exiting. Once two or more of its runs have ended, the service's Overview shows an alert, "The engine keeps restarting this service", saying how many times it has started and stopped, with up to five lines from the engine about the last runs.

While that happens, nothing answers on its address and the terminal has nothing to attach to. The service's Logs hold what the program said before it stopped. The usual causes are a wrong Port, a start command the container cannot run, and an image whose own command expects a person at a keyboard; the service keeps restarting goes through them. This alert is shown for applications and databases; a compose stack's containers are not followed this way.

When setup did not finish

An application from the catalogue is given its storage and its first files by Cloud after it is created and deployed. If a step could not finish, its Overview shows "Setup did not finish" with the reason and Try again. Catalogue setup did not finish covers each reason.

Delete a service

Delete a service from the delete button on its row in the project's list, or from Delete service under "Delete this service" at the end of its Settings section. The confirmation asks you to type the service's name under Service name, then Delete service. From Settings, you return to the project afterwards.

Deleting stops the service and removes it with its environment and its deployments. For a database the confirmation adds "Copy out any data you need first: no backup is taken." It cannot be undone.

Cloud refuses to delete a service that still has something attached. Remove these first, in any order:

Refused withRemove it here
"Remove this service's domains first."Domains, or the service's Domains section: Remove domain on each card. An application that has deployed successfully usually has a generated domain, so this is the first refusal most deletions meet.
"Remove this service's volumes first."Storage, Volumes, or the service's Storage section: Remove on each volume you attached. The data volumes Cloud manages for a database or a compose stack do not count.
"This service still has backup schedules or unfinished backups."Storage, Backups: Archive schedule on each schedule you added yourself, and wait for any backup still in progress to finish. The automatic schedules created with the service are archived for you.
"A deployment of this service is already running."Wait for the deployment to finish, or cancel it.

Removing a domain is itself refused while the service is suspended or deploying. Deleting a service or project is refused has the full list, and Projects covers deleting the project once it is empty.