Dockerising an ASP.NET Core application

Docker is a technology which allows applications to be packged up and run in containers. In this post we will go through how to achieve this with an ASP.NET Core application. All code from this post is available on my GutHub account. And can be found here. Step 1 - Getting Setup I am going to be doing this from a Mac. But you can easily use Windows or Linux if you prefer. If you don't have it already, you will need to install Docker onto your machine. I have added a couple of links below to install guides on the Docker site. They will walk you through the process and get you all setup and read…

Read more »

ASP.Net to ASP.Net Core 2 - 5 things to know

When I first heard about ASP.NET Core I couldn't wait to try it. But for me, v1 and v1.1 just didn't have enough APIs. Welcome ASP.NET Core 2! The ASP.NET Core 1 framework had around 14-16 thousand APIs available. With ASP.NET Core 2 that number is now in the region of 36 thousand. With that I have started to move over some of my personal projects and wanted to jot down some of the biggest changes from ASP.NET. Dependency Injection is baked in When building any kind of large scalable application, dependency injection (DI) should be in the mix. With ASP.NET Core, Microsoft has taken away the pa…

Read more »

How I Dockerised my blog

Docker is a fantastic tool and great if you're running a VPS like me. However a common question is... What if I want to be able to run multiple sites from a single VPS? Most websites running in containers listen on port 80 by default. Only one of them can be bound to that port at a time, so whats the answer? Well, unless you want to access your websites using addresses such as www.example.com:1234. Then a reverse proxy is the answer. Nginx will be our reverse proxy. It will take all incoming requests and route them to the correct container via Dockers VIRTUAL_HOST variable. Prerequisites You w…

Read more »

Creating an ASP.NET Core app on a Mac

Coming from a Windows background I took the plunge recently and swapped to a Mac. This gives the perfect opportunity to get into .NET Core! In this post I'm going to take you through getting everything setup and creating your first app. Prerequisites Lets just go over a few things to get us started .Net Core Now we have chosen an editor the next thing we need to do is install .Net Core iteself. Regardless of which editor you choose this step will install the required command line tools or project templates to get started. Head over here to download the SDK and follow the installation steps. No…

Read more »

HTTPS with Nginx and Let's Encrypt

I've been wanting to get started on this blog for a while now but I wasn't sure what to kick things off with. Then I realised that setting this blog up has been pretty interesting. So why not start with a post about that... The Problem When I setup this blog I had an issue with not being able to redirect my www subdomain to non-www over HTTPS. I kept receiving a Not Secure error from Chrome stating that I had no valid certificate. My SSL certificate is provided by the awesome Let's Encrypt service. And after some Googling I realised that when I had setup the blog using Ghosts CLI it had only c…

Read more »