Octopus Deploy Documentation

Create and Push an ASP.NET Core project

Last updated

The sample project for this guide is the Angular project template with ASP.NET Core application. The template consists of an ASP.NET Core project to act as an API backend and an Angular CLI project to act as a UI. The base project has been modified slightly to host the Angular CLI project outside of the ASP.NET Core project to enable us to configure NGINX both as a reverse proxy to the ASP.NET Core project while also serving the Angular CLI project as static content from the file system.

Upload the Package to the Built-in Repository

Firstly we need to make the package available for Octopus to deploy.

We've crafted and packaged v1.0.0 of this sample application for you to try out (see the link below). Alternatively you can create your own application and package the application yourself to try it out. Click here for steps to publish and package the ASP.NET Core project.

  1. Download NginxSampleWebApp.1.0.0.zip.
  2. Upload it to the Octopus Built-In repository (you can do this by going to Library ➜ Packages and clicking the Upload package button).

Publishing and Packing the Website

# Publish the application to a folder
dotnet publish source/NginxSampleWebApp --output published-app --configuration Release

# Package the folder into a ZIP
octo pack --id NginxSampleWebApp --version 1.0.0 --basePath published-app

If you are using the built-in repository, you can create a zip file instead. The generated nupkg or zip file should then be then be pushed to a repository.

Welcome! We use cookies and data about how you use our website allow us to improve the website and your experience, and resolve technical errors. Our website uses cookies and shares some of your data with third party analytics companies for these purposes.

If you decline, we will respect your privacy. A single cookie will be used in your browser to remember your preference.