diff --git a/content/blog/deployment/index.md b/content/blog/deployment/index.md index 7d3a7c5..edaa1b4 100644 --- a/content/blog/deployment/index.md +++ b/content/blog/deployment/index.md @@ -26,4 +26,12 @@ I let gatsby create an instance of the blog template for me. From this template # How this is run -I mentioned `docker` before. [It seems to be officially supported](https://github.com/gatsbyjs/gatsby-docker). I just went with the documentation and tried to get it to run. +I mentioned `docker` before. [It seems to be officially supported](https://github.com/gatsbyjs/gatsby-docker). I just went with the documentation and tried to get it to run. First, I created a `Dockerfile` in the project with just one line of content: + + FROM gatsbyjs/gatsby:onbuild + +Then, I could build first the gatsby project with `npx gatsby build` and use the optimized output from that to build a docker image with `docker build -t while-false/blog .` from the context of my project root. Next, I started a container from the newly created image with `docker run -d --name blog -p 8080:80 while-false/blog`. It worked on my laptop for `localhost:8080`, I saw the blog I just built. Nice! + +But a blog only for myself on my laptop is a bit boring. So I went on to deploy it on my server (where you are probably reading it right now). I went for the low-tech solution first: I `ssh`d into the server, cloned the git repo, built the gatsby project, built the docker image and spun it up behind my nginx reverse proxy (which I will discuss in a future blog article). + +That's it for a short overview. Maybe I will show some details in the future, let me know if you have specific questions. diff --git a/src/styles/global.css b/src/styles/global.css index 98a41dc..1556ef7 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -1,5 +1,5 @@ body { - background-color: '#e3dcc2' + background-color: #e3dcc2; } code {