This is an example to show how to deploy an application using the .NET Core Application with DB (MySQL)
stack template in Bitnami Stacksmith.
- Go to stacksmith.bitnami.com
- Create a new application and select the .NET Core Application with DB (MySQL) stack template.
- Select the targets you are interested on (AWS, Kubernetes,...)
- Upload the simple-asp-net-core-2-todo-app.zip file (which can be found in releases for the project.
- Upload the boot.sh script from the scripts/ folder.
- Click the Create button.
- Launch it in AWS or download the helm chart to run it in Kubernetes
- Access your application: http://IP for AWS or http://IP:8080 for Kubernetes and Azure
There application requires a boot script that performs application specific initialization.
This script takes care of initializing the database and configuring the application: Basically, it does:
- modify
appsettings.json
file to specify the connection to database - initialize and populate the database
The simple-asp-net-core-2-todo-app.zip file can also be created by building the application in the app/ folder. To build it, you need to have .NET Core SDK installed.
Simply run the following command in the app/ folder:
dotnet publish -c Release
The command sets up all required dependencies, builds the application and creates a publish
folder with the application and dependencies packages.
Next, package the application - such as by doing the following:
$ cd app/bin/Release/netcoreapp2.0/publish && zip -r -9 ../simple-asp-net-core-2-todo-app.zip .