Start modelling your app today.

Get started for free

What's this?

C#Bot Deployment Notes

This article will show you how to deploy your C#Bot application.

1. Prepare Application

a) Change directory into your [projectName]/serverside/src directory.

b) Run dotnet publish -c Release

2. Prepare Deployment Artefact

a) Prepare the docker file i.e Dockerfile It’s contents should take the form


ENV "ServerSettings__ServerUrl" "" 
ENV "ConnectionStrings__DbConnectionString" "Server=[DATABASEHOSTNAME];Database=[DATABASE];Username=postgres;Password=[PASSWORD]" 
ENV "CertificateSetting__JwtBearerAuthority" "" 
# Beta mail trap ENV "EmailAccount__Host" "" 
ENV "EmailAccount__Username" "2702293ad75c53" 
ENV "EmailAccount__Password" "xxxxxx" ENV "EmailAccount__FromAddress" "" 
ENV "EmailAccount__FromAddressDisplayName" "example" 
ENV "EmailAccount__Port" "2525" 

WORKDIR /usr/src/app/ 
ENTRYPOINT ["dotnet", "[PROJECTNAME].dll"]

b) Copy your application artefacts into the same directory as your Dockerfile. You can find this [projectName]/serverside/src/bin/Release/netcoreapp3.1/publish. You should find a collection of files.

c) Build your image by running the following in the same directory as your dockerfile docker build . -t [projectName]/[version]

3. Deploy

a) Copy your new image to your deployment target either by pulling the docker image we created in the previous step or by copying and building the image as shown in step 2.

b) Run your new artefact with docker run [projectName]/[version]

Ready to start building?

Sign up to Codebots today to see how much faster you can build apps with us.