How to Manage Services in App Platform
The usual app creation process will create a service by default; you only need to follow this process if you’re creating another component for your app that needs an internet-accessible endpoint. If you don’t need this component to be internet-accessible, create a worker instead.
Create a Service
- Visit the Apps page and either click Create App if starting from scratch, or click an existing app to add your container image to your solution.
- If adding an image to an existing solution, click the Components tab, then click Service, Worker, or Job.
- Select Container as the source for your code, and choose the image you would like to use from the Repository drop-down.
- On the next page, give your new component a name, and select the tag of the image you would like to deploy.
- Configure any details such as HTTP routes, environment variables, the run command, or the HTTP port.
- Select the instance size you would like to use when a container is created from the image.
When updating the source image tag, a new deployment will be triggered. If the actual tag name has not changed, it is not
guaranteed to pull down a fresh copy of the image due to caching. The recommended approach is to use unique tag names for all
Edit a Service
Go to https://cloud.digitalocean.com/apps, click on your app, and click on the Components tab. Click the Service you’d like to edit.
You can use the configuration settings you see here to change the Service’s scaling behavior, modify environment variables, edit commands, and more.
Destroy a Service
Go to https://cloud.digitalocean.com/apps, click on your app, and click on the Components tab. Click on the Service you’d like to destroy.
You can destroy the Service by clicking the Destroy Component button on the bottom of the page and entering its name to confirm your selection.
The build and run commands are the command-line statements that compile your app component at build time and launch your app component after it has been built, respectively.
A component in App Platform is any deployable, billable, run-time software element in your app. A component can be a database, a service, a worker, or a static site.
A container is a single running instance of a service, worker, or static site component shipped on App Platform.
The HTTP route for a service is the publicly-accessible directory path that maps to the root of your service.
In App Platform, a service is a type of component that is both internet accessible and running server-side code written in a supported programming language, such as Python, Ruby, Go, Node.js, or PHP.