Wires #4: Production Server Setup
Let’s configure the production environment.
Getting a domain
I have bought this domain: ayehia0.info from godaddy and configured the DNS to point to github’s IP. Now going to my domain opens up my personal website which is hosted on github pages.
Getting a server
I have also bought a server on digitalocean and created a droplet.
To get started with your droplet you just created, you have to configure a user as root user is the default one (Imagine the nasty things you can do with that!). For me I have created a user called none
and added my SSH public key to be able to connect in a secure way.
A
record in the DNS section which directs to your IP.Connecting to the Server through SSH
Once you get everything configured, it’s time to connect to the server and install all the packages and dependencies.
Installing dependencies
I installed dotnet, go and docker even through I can use docker directly.
Configuring HTTPs
It’s time to configure HTTPs
, you don’t want to host your website on HTTP for security reasons ofc.
Fortunately, it’s easy to achieve this using certbot which use’s Let’s Encrypt.
Following the instructions on their page (which is straight forward btw), you get HTTPs!
All together
For now everything is manual, so if we want to update any functionality to the server, we will (which isn’t ideal):
- SSH to the Server
- Make changes
- Run server
In the upcoming blogs you will create some CI/CD.
Say Hello :D
Sponsor