fixed typos
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Stephan Dörfler 2020-12-07 07:24:30 +01:00
parent 3a3dee879f
commit 957e2f95be
4 changed files with 7 additions and 7 deletions

View File

@ -8,7 +8,7 @@ description: Initial commit - Introduction
So I finally got around to make a blog. Now what? So I finally got around to make a blog. Now what?
Honestly, I don't even know myself. For the last few years as a developer I consumed whatever the great, wide internet presented me with. I am a huge fan of just going out there and do what you think is good. So now I try to do just that and begin to share what goes through my mind as a developer, DevOps-guy, team-lead and nerd. Maybe someone else can make use of some of it, maybe this is just a glorified public diary. I won't be posting regularly, maybe this project might also just die in a few days, weeks, month or any other point in time. Let's just see. Honestly, I don't even know myself. For the last few years as a developer I consumed whatever the great, wide internet presented me with. I am a huge fan of just going out there and doing what I think is good. So now I try to do just that and begin to share what goes through my mind as a developer, DevOps-guy, team-lead and nerd. Maybe someone else can make use of some of it, maybe this is just a glorified public diary. I won't be posting regularly, maybe this project might also just die in a few days, weeks, month or any other point in time. Let's just see.
# Who am I? # Who am I?

View File

@ -10,7 +10,7 @@ It took some time, but I figured as I only got around to deploy the blog just no
First, some thoughts for my requirements: First, some thoughts for my requirements:
* I'm a developer. I experienced too much pain with wordpress, typo3 and similar CMSs in the past, so whatever I used for a blog had to be closer to what I feel confortable using. * I'm a developer. I experienced too much pain with wordpress, typo3 and similar CMSs in the past, so whatever I used for a blog had to be closer to what I feel confortable using.
* I like to write [`markdown`](https://daringfireball.net/projects/markdown/). It's a nice, human readable syntax that can be easily converted even nicer `HTML` content. * I like to write [`markdown`](https://daringfireball.net/projects/markdown/). It's a nice, human readable syntax that can be easily converted to even nicer `HTML` content.
* For WebApps, I like to use [`React`](https://reactjs.org/). It's a well maintained UI-framework with clean code structure and great extensibility. * For WebApps, I like to use [`React`](https://reactjs.org/). It's a well maintained UI-framework with clean code structure and great extensibility.
* I am kind of cheap. I run a small virtual server with limited resources. To still have reasonable performance and a clean environment I run nothing but [`Docker`](https://www.docker.com/) on it. * I am kind of cheap. I run a small virtual server with limited resources. To still have reasonable performance and a clean environment I run nothing but [`Docker`](https://www.docker.com/) on it.

View File

@ -26,7 +26,7 @@ All steps on the server are handled from the terminal and typing the same comman
Whenever you do the same thing often, automation comes to mind. So the steps on the server are to be automated. I have some ideas for that. Whenever you do the same thing often, automation comes to mind. So the steps on the server are to be automated. I have some ideas for that.
The relevant event I want to react on is the change in the blog. I consider a change as relevant, when a new commit happens on the `master` branch of the `git` repository of the blog. Luckily, `git` has a builtin concept for reacting on events on the server, called "server-side hooks". In my case the `git` server is an instance of `gitea`, so I looked up server side hooks in [the gitea documentation](https://docs.gitea.io/en-us/webhooks/). I quickly found the hook I needed: The relevant event I want to react on is the change in the blog. I consider a change as relevant, when a new commit happens on the `master` branch of the `git` repository of the blog. Luckily, `git` has a builtin concept for reacting on events on the server, called "server-side hooks". In my case the `git` server is an instance of `gitea`, so I looked up server side hooks in [the gitea documentation](https://docs.gitea.io/en-us/webhooks/). I quickly found the hook I needed:
So I can make `git` notify some other component of each change. Now I need something to listen to these notifications and then execute the update-steps automatically. So I can make `git` notify some other component of each change. Now I need something to listen to these notifications and then execute the update-steps automatically.
@ -41,7 +41,7 @@ My first intention was to build that component myself. I know all the commands t
* Push the docker image to my private docker repository. Another authentication required * Push the docker image to my private docker repository. Another authentication required
* On the host exchange the currently running docker container with the newly built one * On the host exchange the currently running docker container with the newly built one
Around that time of planning I decided this isn't the way to go. At my job I rely heavily on [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/) which conveniently covers all these tasks and requirements. But for my private free-time-projects I imposed the restriction on myself to run everything on my own server(s). But until now I only looked at the furthest cases on the automation spectrum: doing everything myself and have everything done by Microsoft in the cloud. I decided that the truth probably lies somewhere inbetween (as so often in life). I then looked at self-hosted CI/CD ("Continous Integration"/"Continous Delivery") systems. Around that time of planning I decided this isn't the way to go. At my job I rely heavily on [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/) which conveniently covers all these tasks and requirements. But for my private free-time-projects I imposed the restriction on myself to run everything on my own server(s). But until now I only looked at the furthest cases on the automation spectrum: doing everything myself and have everything done by Microsoft in the cloud. I decided that the truth probably lies somewhere inbetween (as it does so often in life). I then looked at self-hosted CI/CD ("Continous Integration"/"Continous Delivery") systems.
[Drone](https://drone.io) caught my eye, as it has full docker support, is open source and can have multiple, distributed workers. Perfect, I finally get to use the "sandbox" VPS I rent which just accumulates virtual dust. After reading the documentation, the setup was fairly easy. [Drone](https://drone.io) caught my eye, as it has full docker support, is open source and can have multiple, distributed workers. Perfect, I finally get to use the "sandbox" VPS I rent which just accumulates virtual dust. After reading the documentation, the setup was fairly easy.
@ -74,7 +74,7 @@ steps:
commands: commands:
- npm install - npm install
- npx gatsby build - npx gatsby build
- name: docker - name: docker
image: plugins/docker image: plugins/docker
settings: settings:

View File

@ -61,12 +61,12 @@ const removeScript = (id, parentElement) => {
const Commento = ({ id }) => { const Commento = ({ id }) => {
useEffect(() => { useEffect(() => {
// If there's no window there's nothing to do for us // If there's no window there's nothing to do
if (!window) { if (!window) {
return; return;
} }
const { document } = window; const { document } = window;
// In case our #commento container exists we can add our commento script // In case the #commento container exists, the commento script can be added
if (document.getElementById('commento')) { if (document.getElementById('commento')) {
insertScript('https://comments.while-false.de/js/commento.js', 'commento-script', document.body); insertScript('https://comments.while-false.de/js/commento.js', 'commento-script', document.body);
} }