How to create a SQL Server login for Microsoft SQL Server

The most common SQL Server Connection for development environments in .NET are Data Source=localhost; Database=your_test_db; Trusted_Connection=True. Notice the Trusted_Connection is set to True and a username and password is not supplied. This is because it uses Windows Authentication. At times this is not enough, and we need a SQL Server login. This is generally true for other environments such as test and production. Below I breakdown the various SQL commands in order to create a SQL server login and grant necessary access....

April 23, 2019

A Step by Step Guide on How to Host and Deploy an ASP NET Core app with SSL using Let's Encrypt, Traefik and Docker - Take 2

In this post I describe how to deploy an ASP.NET Core app that has been dockerized and host it on a Linux machine with SSL enabled for free. This is all possible using Traefik, a reverse proxy and load balancer and its integration with Let’s Encrypt. On Reflection In my previous post, whilst it still holds true, I had to break it down into 3 blog posts. It was rather long....

April 16, 2019

How to Automatically Backup a Self-Hosted Ghost Blog and Upload to AWS S3

If you have a Ghost blog like myself, self-hosted, and you’re trying to find out how to backup your blog. Well, I might be able to help. Having done some Googling and finding out various approaches I thought I should share and outline the approach I took. Prerequisites A self-hosted Ghost blog on Linux using MySQL. Familiarity with Linux and basic scripting with Bash. Familiarity of Crontab. Not a must, as I will provide a quick intro guide....

April 5, 2019

How to Encrypt SQL Server using TDE on Docker

Summary In my previous post, how to install and host SQL Server on Linux , I described how to install SQL Server using Docker on Linux with just a Docker Compose file. In this post, I explore things a bit further by turning on transparent data encryption (TDE) which addresses how to encrypt SQL at Rest. A brief intro to Transparent Data Encryption (TDE) Transparent Data Encryption (TDE) in SQL Server is a method where it is able to apply encryption at the file level....

March 26, 2019

How to install and host SQL Server on Linux with Docker for 10 dollars a month

As I’m learning more about Docker, the more I’m starting to love the versility of it. In this post, I will walk through how to launch SQL Server 2017 on a Linux machine using Docker where I’ll be hosting it on DigitalOcean. It’s worth mentioning that Sql Server 2017 does have some pre-requisites: Minimum of 2 GB of disk space. Minimum of 2 GB of RAM. Now, with this mind, the cheapest DigitalOcean droplet that has 2GB of RAM comes in at $10 a month, so thats what I will be using....

March 21, 2019

How to add Sign in with Google, GitHub, Slack and more with ASP.NET Core

I’m sure you have come across web and mobile applications where they offer social logins such as Google, Facebook, Twitter and many more. This is great, as its one less sign up and login you have to remember. It also reduces the friction of signing up. It’s especially great if you can incorporate them into your own applications. The main benefit of this is that it lowers the barrier of entry for people registering to use your product or service....

March 15, 2019

Getting started with Traefik as an alternative and easy to use reverse proxy

After having discovered Traefik accidentally via a simple HN comment from the community, I find it fantastic. It’s a great alternative and relatively simple to use reverse proxy and load balancer. Especially for dockerized web applications. In my previous post I wrote about setting up Nginx as a reverse proxy as well adding SSL with Let’s Encrypt. Whilst that works, and Nginx is a great reverse proxy and it also provides load balancing as well as many other things, I personally found it tricky to configure in Docker....

February 18, 2019

How to add SSL for free to an ASP.NET Core app using Let's Encrypt and Nginx

In this post, I will talk through how to install Nginx as a reverse proxy and configure SSL for free with the help of Let’s Encrypt and Docker. I will be using DigitalOcean, but any Linux machine with Docker installed will also work. So, What is Nginx reverse proxy? If you have not come across Nginx, it is a web server similar to many other common web servers such as IIS and Apache HTTP server....

February 5, 2019

How to deploy and host an ASP.NET Core app on Linux for $5 a month on DigitalOcean

I originally wrote this as a single post to document how I deployed an ASP.NET Core application on DigitalOcean. I also setup a web server using Nginx and setup SSL for free using Lets Encrypt and finally added some basic security with Fail2ban. I soon realised, it became rather large, so I have broken it down into individual sections: How to setup a Linux machine with Docker on DigitalOcean How to deploy and host an ASP....

February 5, 2019

How to secure and protect Nginx on Linux with Fail2ban

When I managed to deploy an ASP.NET core app on Linux with Nginx, I noticed a lot of rogue and spam internet traffic in the Nginx logs. Mostly mild hacking attempts and rather a lot of php requests. Its mostly noise, but I wanted a way of banning these ip addresses as they are no good and this is how I came across using Fail2ban. What is Fail2ban? In short, its a tool that scans log files based on a defined regular expression....

February 5, 2019