Background workers can consist of any application code you like. As far as App Platform is concerned, they are the same as services, except they are not “routable,” i.e. they are not accessible via an external URL.
Select the repository service to retrieve your source code from, either: GitHub, GitLab, DigitalOcean Container Registry, Docker Hub, or a sample app. If you are connecting to your repository from DigitalOcean for the first time, you will need to click the Manage Access button to provide DigitalOcean access to the repositories or containers, then refresh this page.
Select the repository from the Repository drop-down list. Next, select which branch of the source repo you’d like to use as the source. Optionally, for monorepos, specify the folder that contains the source in the Source Directory field. For containers, specify the image tag to use. Click Next.
App Platform will inspect the code, select an appropriate resource type and also detect any appropriate build and run commands.
To change to a different resource type, click the edit icon to open the Settings page of the resource. Click the Edit link next to Resource Type, choose another option from the Type drop-down list and click Save. Additionally, you can change the resource’s name, scaling behavior, edit the build and run commands, the HTTP port and request route, and more.
Optionally, if you want to specify additional resources, click the Add Additional Resource From Source link, repeat the procedure and click Next.
If you need to use environment variables, click Edit to the right of the resource name and supply them. Click the Encrypt checkbox to ensure a variable’s value is obscured in all build, deploy, and application logs.
To specify an app-level environment variable, click Edit to the right of Global. Click Save and then click Next.
Review the resources, environment variables and pricing, and click Create Resources.
In the Apps section of the DigitalOcean Control Panel, select your app and click on the Settings tab. Click the Worker you’d like to edit.
In the Apps section of the DigitalOcean Control Panel, select your app and click on the Settings tab. Click on the Worker you’d like to destroy.
You can destroy the Worker by clicking the Destroy Component button on the bottom of the page and entering its name to confirm your selection.