Deploy Nuxt on DigitalOcean App Platform
How to deploy Nuxt on DigitalOcean App Platform?
DigitalOcean App Platform allows you to build, deploy, and scale apps quickly using a simple, fully managed solution. They’ll handle the infrastructure, app runtimes and dependencies, so that you can push code to production in just a few clicks.
App Platform includes the following features:
- Build, deploy, manage, and scale apps.
- Secure apps automatically. They create, manage and renew your SSL certificates and also protect your apps from DDoS attacks.
- Support for Node.js, static sites, Python, Django, Go, PHP, Laravel, React, Ruby, Ruby on Rails, Gatsby, Hugo, container images.
- Deploy code directly from your GitHub and GitLab repositories. Automatically re-deploy the app when you push updates to your source code.
- Zero infrastructure management. App Platform uses open, cloud native standards and automatically analyzes your code, creates containers, and runs them on Kubernetes clusters.
- Highly scalable. Scale horizontally or vertically.
Prerequisites
This guide assumes you already have a Nuxt project to deploy. If you need a project, use the create-nuxt-app to get started.
Setup
- Link your repository: Create a new account on DigitalOcean and connect your GitHub or Gitlab account. Then select the repository you want to deploy.
- Choose a branch of your repo and a region to deploy your site.
- 
Choose the service that suits your website.
Type Settings Server Web service - Build command yarn build& Run commandyarn start --hostname 0.0.0.0Static Static Sites - Build command yarn generate& Output directorydistWarning: For the server type you need to change the HTTP port from 8080 to 3000 in the Web service settings.
 More information at this article .  
- If you have any environment variable, add them manually in the key-value pair inputs.
Once you pass the process, you hit deploy and your site will be live on an autogenerated url as soon as the build is done.
Continuous deployment (CD)
Now that App Platform is connected to your repo, it will automatically build and publish your site any time you push a new change.
Add custom domains
Add your own domains to your site easily on Settings > Domains > Add domain or follow this How to Manage Domains in App Platform guide.
Deploy to DigitalOcean button
The Deploy to DigitalOcean Button allows users to launch an application onto App Platform. It can be embedded in the README file for GitHub repositories, allowing users who are browsing your repository to deploy your code in one click, adding a .yaml file into your repo. Check it out at How to Add a "Deploy to DigitalOcean" Button to Your Repository
 Leoš Literák
 
        Leoš Literák
        Trizotti
 
        Trizotti
        Clément Ollivier
 
        Clément Ollivier
        Sébastien Chopin
 
        Sébastien Chopin
        Marcello Bachechi
 
        Marcello Bachechi
        Rodolphe
 
        Rodolphe
        Thomas Underwood
 
        Thomas Underwood
        Shek Evgeniy
 
        Shek Evgeniy
        felipesuri
 
        felipesuri
        Lukasz Formela
 
        Lukasz Formela
        Hugo Torzuoli
 
        Hugo Torzuoli
        Sylvain Marroufin
 
        Sylvain Marroufin
        Kareem Dabbeet
 
        Kareem Dabbeet
        tramplay
 
        tramplay
        Daniel Roe
 
        Daniel Roe
        verebelyicsaba
 
        verebelyicsaba
        Adam
 
        Adam
        Nate Butler
 
        Nate Butler
        Sandra Rodgers
 
        Sandra Rodgers
        Arpit Patidar
 
        Arpit Patidar
        Matthew Kuehn
 
        Matthew Kuehn
        Steven DUBOIS
 
        Steven DUBOIS
        Travis Lindsey
 
        Travis Lindsey
        syagawa
 
        syagawa
        Maxime
 
        Maxime
        かる
 
        かる
        Al Power
 
        Al Power
        Florent Delerue
 
        Florent Delerue
        quanghm
 
        quanghm
        José Manuel Casani Guerra
 
        José Manuel Casani Guerra
        Unai Mengual
 
        Unai Mengual
        kazuya kawaguchi
 
        kazuya kawaguchi
        Michael Lynch
 
        Michael Lynch
        Tomachi
 
        Tomachi
        pooya parsa
 
        pooya parsa
        Meir Roth
 
        Meir Roth
        Brett
 
        Brett
        Adam Miedema
 
        Adam Miedema
        Thomas Bnt
 
        Thomas Bnt
        Kazuki Furukawa
 
        Kazuki Furukawa
        Anthony Ruelle
 
        Anthony Ruelle
        Christophe Carvalho Vilas-Boas
 
        Christophe Carvalho Vilas-Boas
        Roman Harmyder
 
        Roman Harmyder