Question

How to deployement Angular v17 in apps services?

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


Submit an answer
ļ»æ

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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
ā€¢ January 2, 2024

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

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow ā€” whether you're running one virtual machine or ten thousand.

Learn more