Skip to content

Instantly share code, notes, and snippets.

@armanm
Created December 30, 2020 08:12
Show Gist options
  • Save armanm/14a8ee3c41530848221b24b552adf97d to your computer and use it in GitHub Desktop.
Save armanm/14a8ee3c41530848221b24b552adf97d to your computer and use it in GitHub Desktop.
DigitalOcean App Platform with container registry and image spec example
name: arman-test
region: nyc3
services:
-
name: nginx
image:
registry_type: DOCR
repository: my-nginx
tag: latest
instance_size_slug: basic-xxs
http_port: 80
@armanm
Copy link
Author

armanm commented Dec 30, 2020

Here are the steps to follow:

  1. get a DO account and an API token
  2. download the doctl CLI tool
  3. install docker on your machine
  4. download nginx hello world image via docker pull nginxdemos/hello
  5. tag your downloaded image with docker tag <THE-NGINX-IMAGE-ID> registry.digitalocean.com/<YOUR-REGISTRY-NAME>/my-nginx
  6. login to DO using doctl auth init
  7. create your own docker registry on DO using doctl registry create <YOUR-REGISTRY-NAME>
  8. push the nginx image to DO docker registry via docker push registry.digitalocean.com/<YOUR-REGISTRY-NAME>/my-nginx
  9. download the above spec.yml file to disk and from the same location run doctl apps create --spec ./spec.yaml
  10. go to DO apps dashboard to view the deploy progress

If all is working you will shortly see a deploy success status and the public URL for your app which should return a NGINX hello world page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment