In this post, I tell you the last steps to be able to see our little potatizer online π
Deployment in DigitalOcean App platform
With App platform, uploading our project has been a piece of cake.
After registering with GitHub and then linking it to App Platform, in two clicks I had the web live!
The only things we have to take into account are:
- Choose the service that suits your website, how to render it. In my case: static sites.
- Choose the branch that we want to run the autodeploy when we make changes (CD: Continuous Deployment).
- Choose the command that will build our project:
yarn generate
. - If you have any environment variable, add them manually in the key-value pair inputs.
Once you pass the process, you hit deploy and you can forget about it π
You can see the live result here - πPotatizer live demo deployedπ
Deploy Button (extended)
One thing that has driven me crazy about DigitalOcean π€―, has been the idea of implementing a button that allows another person to deploy my project in their environment!
A fantasy, just adding a deploy.template.yaml file in a folder called .do in the root of my project with the following 'spec':
spec: name: cd # Service type: Static sites static_sites: - environment_slug: html # Nuxt generate to build our project build_command: yarn generate git: # CD branch and url to the code branch: main repo_clone_url: https://github.com/Dawntraoz/potatizer.git name: potatizer
And to make it run, we simply use the code DigitalOcean provide to add it to the web (in html) or to the readme (in markdown):
[](https://cloud.digitalocean.com/apps/new?repo=<repo_url>/tree/<branch>)
being repo_url
the github repo link, in my case https://github.com/Dawntraoz/potatizer, and the branch you've chosen (main).
Repository
If you want to take a look at the code, here is the repository.
I hope you liked the journey and that we have a few potaters laughs together π₯
Thanks for sharing these stupid ideas with me, happy to have you π€
Top comments (0)