Deploying Nginx + PHP + git-sync on Kubernetes

In my previous post, I explained how to setup a simple nginx instance that could be used to sync to a private Git repo. The only drawback is that this setup will only serve static pages. What if you wanted to be able to run a server with dynamic code like PHP? I’m glad you asked! In this post, we’ll update our config to include a php-fpm instance to allow us to serve PHP pages. ...

December 30, 2019 · 6 min · Scott

Building a Kubernetes Container That Synchs with Private Git Repo

My previous post explained how to create a private git repo. On its own, that post is roughly useless unless you planned to maintained some private copy of your project so nobody can see it. In this post, we’re going to put that private repo to use in a Kubernetes environment. A basic assumption is that you already have a Kubernetes environment setup. Adding Another SSH Key to the Repo The first step would be to add another SSH Key to our repo. The purpose of this key is to be used to configure access from the container to the repo. We’ll load the SSH key into Kubernetes as a secret. We can’t set a password on this key or we might get prompted for the password during container build and that’s not useful. Also, since the key will not have a password, we won’t give it Read / Write access to our repo. ...

December 26, 2019 · 10 min · Scott

Creating a Private GitHub Repo

The first step in my adventure was to first create a location to store my web content. The mostly likely location for this was GitHub. The process for signing up for a GitHub account is pretty easy so I won’t bother going through that process here. I’m going to assume that you figured that part out and I will begin with that assumption. Setting Up a Private GitHub Repo Once you have your account, you’ll need to next setup your very first repo. Login to GitHub and click on the “New” button to create a repo On the resulting screen: 1. Enter a name for your repo 2. Enter a description if you like 3. We’re creating a private repo here because we don’t want anyone messing with it or having access to it (more on that in a future post). 4. Let’s also initialize the repo with a blank README. This way you can add notes to the repo later if you have anything specific to remind yourself of ...

December 20, 2019 · 8 min · Scott

Stay Tuned…

This is just a placeholder for what is to come. I decided to start tinkering around with Kubernetes and getting it to do “fun” stuff. This will be my first of future posts to explain how I have my personal website setup and running using a combination of: Kubernetes Private GitHub Repo Nginx PHP So as the title of this first post says, stay tuned as I recreate and document my environment via this blog. ...

December 20, 2019 · 1 min · Scott