Report this

What is the reason for this report?

How to deployement Angular v17 in apps services?

Posted on December 30, 2023

Hi everybody 😊 How is the procedure to deploy an Angular version 17 project in the application service (Apps)? Greetings, Yan



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there

Deploying an Angular version 17 project on DigitalOcean’s App Platform involves a few key steps. The App Platform provides a straightforward way to deploy web applications directly from your source code repository. Here’s a general guide to help you get started:

1. Build Your Angular Project

Before deploying, make sure your Angular project is ready for production. Run the build command to create a production build of your project:

ng build --prod

This command compiles your Angular application into output files that are optimized for production and places them in the dist/ directory.

2. Push Your Code to a Git Repository

If you haven’t already, initialize a Git repository in your project folder and push your code to GitHub, GitLab, or Bitbucket. Include the dist/ directory in your repository.

3. Create a New App on DigitalOcean App Platform

  • Go to the App Platform: Log in to your DigitalOcean account and navigate to the App Platform section.
  • Create a New App: Click on ā€œCreate Appā€.
  • Choose Your Source: Select the source where your Angular project is hosted (GitHub, GitLab, or Bitbucket).

4. Configure Your App

  • Select Your Repository: Choose the repository where your Angular project is stored.
  • Configure Your App: DigitalOcean will try to auto-detect the type of application. Since Angular projects are static sites, make sure it is recognized as such. If not, you can manually configure it as a static site. Deploying your Angluar as a static site is essential as there is no need to run it as a service in production.
  • Build and Output Settings: Ensure the build command and output directory are set correctly. For Angular, the output directory is usually dist/your-project-name.

Finally, review all settings, and if everything looks good, click on ā€œLaunch Appā€.

After your app is deployed, you can configure a custom domain via the App Platform’s settings if required.

Let me know how it goes!

Best,

Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.