From 54df2ea9d571c9dea08b11fc324172517f46e747 Mon Sep 17 00:00:00 2001 From: Kamal Nasser Date: Mon, 28 Sep 2020 00:03:15 +0300 Subject: [PATCH 01/12] Update .do/app.yaml --- .do/app.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.do/app.yaml b/.do/app.yaml index af4bee7e..2405d557 100644 --- a/.do/app.yaml +++ b/.do/app.yaml @@ -2,7 +2,7 @@ name: sample-python services: - environment_slug: python github: - branch: master + branch: main deploy_on_push: true repo: digitalocean/sample-python name: sample-python From 4495bbdb0fc246c77741f5ccf77d2c7735924c9e Mon Sep 17 00:00:00 2001 From: Anas Alkhatib Date: Thu, 15 Oct 2020 13:49:52 -0400 Subject: [PATCH 02/12] Fix link to docs (#1) * Fix link to docs Got a 404 with the old url * Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ca28452..deb2f4d0 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Here's an example code change you can make for this app: ## Learn More ## -You can learn more about the App Platform and how to manage and update your application at https://www.digitalocean.com/docs/apps/. +You can learn more about the App Platform and how to manage and update your application at https://www.digitalocean.com/docs/app-platform/. ## Deleting the App # From 05201bcd9a8162368f6d71c705e783a7156dfc99 Mon Sep 17 00:00:00 2001 From: Dhruv Kela <30433468+keladhruv@users.noreply.github.com> Date: Tue, 27 Oct 2020 14:24:30 -0400 Subject: [PATCH 03/12] update to deploy.template.yaml (#6) * add deploy.template.yaml Co-authored-by: dkela --- .do/deploy.template.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .do/deploy.template.yaml diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml new file mode 100644 index 00000000..5b055874 --- /dev/null +++ b/.do/deploy.template.yaml @@ -0,0 +1,8 @@ +spec: + name: sample-python + services: + - environment_slug: python + git: + branch: main + repo_clone_url: https://github.com/digitalocean/sample-dockerfile.git + name: sample-python From d00e08e185ad78de5d188b82d649d8769f49ec8e Mon Sep 17 00:00:00 2001 From: Dhruv Kela <30433468+keladhruv@users.noreply.github.com> Date: Mon, 9 Nov 2020 13:14:18 -0500 Subject: [PATCH 04/12] updated git url (#7) Co-authored-by: dkela --- README.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index deb2f4d0..8c5d7ba2 100644 --- a/README.md +++ b/README.md @@ -16,15 +16,9 @@ After forking the repo, you should now be viewing this README in your own github ## Deploying the App ## -1. Visit https://cloud.digitalocean.com/apps (if you're not logged in, you may see an error message. Visit https://cloud.digitalocean.com/login directly and authenticate, then try again) -1. Click "Launch App" or "Create App" -1. Choose GitHub and authenticate with your GitHub credentials. -1. Under Repository, choose this repository (e.g. `/sample-python`) -1. On the next two screens, leave all the defaults unchanged. -1. Click "Launch App" -1. You should see a "Building..." progress indicator. And you can click "Deployments"→"Details" to see more details of the build. -1. It can currently take 5-6 minutes to build this app, so please be patient. Live build logs are coming soon to provide much more feedback during deployments. -1. Once the build completes successfully, click the "Live App" link in the header and you should see your running application in a new tab +Click this button to deploy the app to the DigitalOcean App Platform. + + [![Deploy to DO](https://mp-assets1.sfo2.digitaloceanspaces.com/deploy-to-do/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/digitalocean/sample-python/tree/main) ## Making Changes to Your App ## From 0a9279198abede1864a2d81363700ffad9606886 Mon Sep 17 00:00:00 2001 From: Bojan Date: Tue, 10 Nov 2020 10:26:47 -0400 Subject: [PATCH 05/12] Fix repo_clone_url in template --- .do/deploy.template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index 5b055874..49d9df1e 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -4,5 +4,5 @@ spec: - environment_slug: python git: branch: main - repo_clone_url: https://github.com/digitalocean/sample-dockerfile.git + repo_clone_url: https://github.com/digitalocean/sample-python.git name: sample-python From db9af4e0c74c18c5280d5740d1c9f89d17b2b970 Mon Sep 17 00:00:00 2001 From: Kamal Nasser Date: Sat, 9 Jan 2021 21:08:03 +0200 Subject: [PATCH 06/12] Update README.md --- README.md | 52 +++++++++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 8c5d7ba2..321b086c 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,55 @@ -# Getting Started # +# Getting Started -These steps will get this sample application running for you using DigitalOcean. +These steps will get this sample Python application running for you using DigitalOcean App Platform. -**Note: Following these steps will result in charges for the use of DigitalOcean services** +**Note: Following these steps may result in charges for the use of DigitalOcean services** ## Requirements * You need a DigitalOcean account. If you don't already have one, you can sign up at https://cloud.digitalocean.com/registrations/new -## Forking the Sample App Source Code +## Deploying the App -To use all the features of App Platform, you need to be running against your own copy of this application. To make a copy, click the Fork button above and follow the on-screen instructions. In this case, you'll be forking this repo as a starting point for your own app (see [Github documentation](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) to learn more about forking repos. +Click this button to deploy the app to the DigitalOcean App Platform. If you are not logged in, you will be prompted to log in with your DigitalOcean account. -After forking the repo, you should now be viewing this README in your own github org (e.g. `https://github.com//sample-python`) +[![Deploy to DigitalOcean](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/digitalocean/sample-python/tree/main) -## Deploying the App ## +Using this button disable the "Auto deploy changes on push" feature as you are using this repo directly. If you wish to try that feature, you will need to make your own copy of this repository. -Click this button to deploy the app to the DigitalOcean App Platform. +To make a copy, click the Fork button above and follow the on-screen instructions. In this case, you'll be forking this repo as a starting point for your own app (see [GitHub documentation](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) to learn more about forking repos. - [![Deploy to DO](https://mp-assets1.sfo2.digitaloceanspaces.com/deploy-to-do/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/digitalocean/sample-python/tree/main) +After forking the repo, you should now be viewing this README in your own github org (e.g. `https://github.com//sample-python`). To deploy the new repo, visit https://cloud.digitalocean.com/apps and click "Create App" or "Launch Your App". Then, select the repository you created and be sure to select the `main` branch. -## Making Changes to Your App ## +After clicking the "Deploy to DigitalOcean" button or completing the instructions above to fork the repo, follow these steps: -As long as you left the default Autodeploy option enabled when you first launched this app, you can now make code changes and see them automatically reflected in your live application. During these automatic deployments, your application will never pause or stop serving request because the App Platform offers zero-downtime deployments. +1. Select which region you wish to deploy your app to and click Next. The closest region to you should be selected by default. All App Platform apps are routed through a global CDN so this will not affect your app performance, unless it needs to talk to external services. +1. On the following screen, leave all the fields as they are and click Next. +1. Confirm your Plan settings and how many containers you want to launch and click **Launch Basic/Pro App**. +1. You should see a "Building..." progress indicator. And you can click "Deployments"→"Details" to see more details of the build. +1. It can take a few minutes for the build to finish, but you can follow the progress by clicking the "Details" link in the top banner. +1. Once the build completes successfully, click the "Live App" link in the header and you should see your running application in a new tab, displaying the home page. + +## Making Changes to Your App + +If you followed the steps above to fork the repo and used your own copy when deploying the app, you can enjoy automatic deploys whenever changes are made to the repo. During these automatic deployments, your application will never pause or stop serving request because App Platform offers zero-downtime deployments. Here's an example code change you can make for this app: -1. Edit [server.py](server.py) -1. Change `Hello!` into another greeting. -1. Commit the change to master. Normally it's a better practice to create a new branch for your change and then merge that branch to master after review, but for this demo you can commit to master directly. -1. Visit https://cloud.digitalocean.com/apps and navigate to your sample-python app. -1. You should see a "Building..." progress indicator, just like above. + +1. Edit `index.php` and replace "Hello!" on line 12 with a different greeting +1. Commit the change to the `main` branch. Normally it's a better practice to create a new branch for your change and then merge that branch to `main` after review, but for this demo you can commit to the `main` branch directly. +1. Visit https://cloud.digitalocean.com/apps and navigate to your sample app. +1. You should see a "Building..." progress indicator, just like when you first created the app. 1. Once the build completes successfully, click the "Live App" link in the header and you should see your updated application running. You may need to force refresh the page in your browser (e.g. using Shift+Reload). -## Learn More ## +## Learn More You can learn more about the App Platform and how to manage and update your application at https://www.digitalocean.com/docs/app-platform/. - -## Deleting the App # +## Deleting the App When you no longer need this sample application running live, you can delete it by following these steps: 1. Visit the Apps control panel at https://cloud.digitalocean.com/apps -1. Navigate to the sample-python app +1. Navigate to the sample app 1. Choose "Settings"->"Destroy" -This will delete the app and destroy any underlying DigitalOcean resources - -**Note: If you don't delete your app, charges for the use of DigitalOcean services will continue to accrue.** +**Note: If you don't delete your app, charges for the use of DigitalOcean services will continue to accrue.** \ No newline at end of file From 24752381386b7fd36ce4f4ea73df3f21e6d212c6 Mon Sep 17 00:00:00 2001 From: Ilia Belov Date: Sat, 8 May 2021 01:25:20 +1200 Subject: [PATCH 07/12] Mistype server.py index.php --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 321b086c..da76072c 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ If you followed the steps above to fork the repo and used your own copy when dep Here's an example code change you can make for this app: -1. Edit `index.php` and replace "Hello!" on line 12 with a different greeting +1. Edit `server.py` and replace "Hello!" on line 12 with a different greeting 1. Commit the change to the `main` branch. Normally it's a better practice to create a new branch for your change and then merge that branch to `main` after review, but for this demo you can commit to the `main` branch directly. 1. Visit https://cloud.digitalocean.com/apps and navigate to your sample app. 1. You should see a "Building..." progress indicator, just like when you first created the app. @@ -52,4 +52,4 @@ When you no longer need this sample application running live, you can delete it 1. Navigate to the sample app 1. Choose "Settings"->"Destroy" -**Note: If you don't delete your app, charges for the use of DigitalOcean services will continue to accrue.** \ No newline at end of file +**Note: If you don't delete your app, charges for the use of DigitalOcean services will continue to accrue.** From 010c5666a65f2c13dcabc2262b0e312c36e42298 Mon Sep 17 00:00:00 2001 From: Sharmita Das Date: Tue, 17 Aug 2021 14:30:11 -0400 Subject: [PATCH 08/12] Readme edits --- README.md | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index da76072c..630f2628 100644 --- a/README.md +++ b/README.md @@ -1,55 +1,56 @@ -# Getting Started +## Getting Started -These steps will get this sample Python application running for you using DigitalOcean App Platform. +We provide a sample app using Python that you can deploy on App Platform. These steps will get this sample application running for you using App Platform. -**Note: Following these steps may result in charges for the use of DigitalOcean services** +**Note: Following these steps may result in charges for the use of DigitalOcean services.** -## Requirements +### Requirements + +* You need a DigitalOcean account. If you don't already have one, you can sign up at https://cloud.digitalocean.com/registrations/new. -* You need a DigitalOcean account. If you don't already have one, you can sign up at https://cloud.digitalocean.com/registrations/new - ## Deploying the App Click this button to deploy the app to the DigitalOcean App Platform. If you are not logged in, you will be prompted to log in with your DigitalOcean account. [![Deploy to DigitalOcean](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/digitalocean/sample-python/tree/main) -Using this button disable the "Auto deploy changes on push" feature as you are using this repo directly. If you wish to try that feature, you will need to make your own copy of this repository. +Using this button disables the ability to automatically re-deploy your app when pushing to a branch or tag in your repository as you are using this repo directly. -To make a copy, click the Fork button above and follow the on-screen instructions. In this case, you'll be forking this repo as a starting point for your own app (see [GitHub documentation](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) to learn more about forking repos. +If you want to automatically re-deploy your app, [fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the GitHub repository to your account so that you have a copy of it stored to the cloud. Click the **Fork** button in the GitHub repository and follow the on-screen instructions. -After forking the repo, you should now be viewing this README in your own github org (e.g. `https://github.com//sample-python`). To deploy the new repo, visit https://cloud.digitalocean.com/apps and click "Create App" or "Launch Your App". Then, select the repository you created and be sure to select the `main` branch. +After forking the repo, you should now be viewing this README in your own GitHub org (e.g. `https://github.com//sample-python`). To deploy the new repo, visit https://cloud.digitalocean.com/apps and click **Create App**. Then, click **GitHub**, select the repository you created and select the `main` branch. App Platform will inspect the code, automatically detect the kind of component to create, and use the correct buildpack to create and deploy a container. -After clicking the "Deploy to DigitalOcean" button or completing the instructions above to fork the repo, follow these steps: +After clicking the **Deploy to DigitalOcean** button or completing the instructions above to fork the repo, follow these steps: -1. Select which region you wish to deploy your app to and click Next. The closest region to you should be selected by default. All App Platform apps are routed through a global CDN so this will not affect your app performance, unless it needs to talk to external services. -1. On the following screen, leave all the fields as they are and click Next. -1. Confirm your Plan settings and how many containers you want to launch and click **Launch Basic/Pro App**. -1. You should see a "Building..." progress indicator. And you can click "Deployments"→"Details" to see more details of the build. -1. It can take a few minutes for the build to finish, but you can follow the progress by clicking the "Details" link in the top banner. -1. Once the build completes successfully, click the "Live App" link in the header and you should see your running application in a new tab, displaying the home page. +1. Configure the app such as specifying HTTP routes, environment variables or adding a database. +1. Provide a name for your app and select which region you want to deploy your app to and click **Next**. The closest region to you should be selected by default. All App Platform apps are routed through a global CDN. So this will not affect your app performance, unless it needs to talk to external services. +1. On the following screen, leave all the fields as they are and click **Next**. +1. Confirm your **Plan** settings and how many containers you want to launch and click **Launch Basic/Pro App**. +1. You should see a "Building..." progress indicator. You can click **View Logs** to see more details of the build. +1. It can take a few minutes for the build to finish, but you can follow the progress in the **Deployments** tab. +1. Once the build completes successfully, click the **Live App** link in the header and you should see your running application in a new tab, displaying the home page. -## Making Changes to Your App +### Making Changes to Your App -If you followed the steps above to fork the repo and used your own copy when deploying the app, you can enjoy automatic deploys whenever changes are made to the repo. During these automatic deployments, your application will never pause or stop serving request because App Platform offers zero-downtime deployments. +If you followed the steps to fork the repo and used your own copy when deploying the app, you can push changes to your fork and see App Platform automatically re-deploy the update to your app. During these automatic deployments, your application will never pause or stop serving request because App Platform offers zero-downtime deployments. Here's an example code change you can make for this app: -1. Edit `server.py` and replace "Hello!" on line 12 with a different greeting +1. Edit `index.php` and replace "Hello!" on line 12 with a different greeting 1. Commit the change to the `main` branch. Normally it's a better practice to create a new branch for your change and then merge that branch to `main` after review, but for this demo you can commit to the `main` branch directly. 1. Visit https://cloud.digitalocean.com/apps and navigate to your sample app. 1. You should see a "Building..." progress indicator, just like when you first created the app. -1. Once the build completes successfully, click the "Live App" link in the header and you should see your updated application running. You may need to force refresh the page in your browser (e.g. using Shift+Reload). +1. Once the build completes successfully, click the **Live App** link in the header and you should see your updated application running. You may need to force refresh the page in your browser (e.g. using **Shift+Reload**). -## Learn More +### Learn More You can learn more about the App Platform and how to manage and update your application at https://www.digitalocean.com/docs/app-platform/. ## Deleting the App When you no longer need this sample application running live, you can delete it by following these steps: -1. Visit the Apps control panel at https://cloud.digitalocean.com/apps -1. Navigate to the sample app -1. Choose "Settings"->"Destroy" +1. Visit the Apps control panel at https://cloud.digitalocean.com/apps. +2. Navigate to the sample app. +3. In the **Settings** tab, click **Destroy**. -**Note: If you don't delete your app, charges for the use of DigitalOcean services will continue to accrue.** +**Note: If you do not delete your app, charges for using DigitalOcean services will continue to accrue.** \ No newline at end of file From 1175f907ab15d81c82df11393be60bd432553c3d Mon Sep 17 00:00:00 2001 From: Rein Date: Mon, 21 Feb 2022 19:16:44 +0100 Subject: [PATCH 09/12] Change php to py --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 630f2628..b1baaefe 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ If you followed the steps to fork the repo and used your own copy when deploying Here's an example code change you can make for this app: -1. Edit `index.php` and replace "Hello!" on line 12 with a different greeting +1. Edit `server.py` and replace "Hello!" on line 12 with a different greeting 1. Commit the change to the `main` branch. Normally it's a better practice to create a new branch for your change and then merge that branch to `main` after review, but for this demo you can commit to the `main` branch directly. 1. Visit https://cloud.digitalocean.com/apps and navigate to your sample app. 1. You should see a "Building..." progress indicator, just like when you first created the app. @@ -53,4 +53,4 @@ When you no longer need this sample application running live, you can delete it 2. Navigate to the sample app. 3. In the **Settings** tab, click **Destroy**. -**Note: If you do not delete your app, charges for using DigitalOcean services will continue to accrue.** \ No newline at end of file +**Note: If you do not delete your app, charges for using DigitalOcean services will continue to accrue.** From 993579ea00dce9e684552001632b0cc50c2de9af Mon Sep 17 00:00:00 2001 From: Elan Hasson <234704+ElanHasson@users.noreply.github.com> Date: Tue, 19 Dec 2023 19:20:03 -0500 Subject: [PATCH 10/12] Create dependabot.yaml --- .github/dependabot.yaml | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/dependabot.yaml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 00000000..6ce995d5 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,65 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# borrowed from https://github.com/dependabot/dependabot-core/blob/main/.github/dependabot.yml + +version: 2 +updates: + - package-ecosystem: "bundler" + directory: "/" + schedule: + interval: "daily" + groups: + dev-dependencies: + dependency-type: "development" + update-types: + - "minor" + - "patch" + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "daily" + groups: + dev-dependencies: + dependency-type: "development" + update-types: + - "minor" + - "patch" + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "mix" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" + groups: + dev-dependencies: + dependency-type: "development" + update-types: + - "minor" + - "patch" + ignore: + - dependency-name: "npm" + update-types: ["version-update:semver-major"] + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "pub" + directory: "/" + schedule: + interval: "daily" From 25a1380cb201a0c6a7255ffae2be41b94a13dda6 Mon Sep 17 00:00:00 2001 From: aupadhyay Date: Sat, 13 Dec 2025 19:35:29 +0530 Subject: [PATCH 11/12] instance_size_update --- .do/deploy.template.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index 49d9df1e..95fcb305 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -5,4 +5,6 @@ spec: git: branch: main repo_clone_url: https://github.com/digitalocean/sample-python.git + instance_count: 1 + instance_size_slug: apps-s-1vcpu-0.5gb name: sample-python From 8795549a6d2859ea475bd831018235d83fff11b2 Mon Sep 17 00:00:00 2001 From: aupadhyay Date: Mon, 15 Dec 2025 14:19:38 +0530 Subject: [PATCH 12/12] update_instance_size --- .do/deploy.template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index 95fcb305..b091a2c6 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -6,5 +6,5 @@ spec: branch: main repo_clone_url: https://github.com/digitalocean/sample-python.git instance_count: 1 - instance_size_slug: apps-s-1vcpu-0.5gb + instance_size_slug: apps-s-1vcpu-0.5gb name: sample-python