Add page about website server container
This commit is contained in:
parent
8e0baa3712
commit
020eb43345
2 changed files with 27 additions and 0 deletions
|
@ -18,3 +18,5 @@ If you're not really bothered, the default [`nginx`](https://hub.docker.com/_/ng
|
||||||
{{% repobutton %}}
|
{{% repobutton %}}
|
||||||
|
|
||||||
Previously I had created [`tstatic`](https://github.com/RealOrangeOne/tstatic) to do this, but Nginx is far better as a server than node. The less node in my stack, the better!
|
Previously I had created [`tstatic`](https://github.com/RealOrangeOne/tstatic) to do this, but Nginx is far better as a server than node. The less node in my stack, the better!
|
||||||
|
|
||||||
|
Note this isn't designed for serving websites. In fact, design decisions were made which make it really bad for websites. If you want to serve websites, take a look at [`docker-website-server`]({{<relref "docker-website-server">}})
|
||||||
|
|
25
content/projects/docker-website-server.md
Normal file
25
content/projects/docker-website-server.md
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
title: Docker Website Server
|
||||||
|
repo: RealOrangeOne/docker-website-server
|
||||||
|
subtitle: Static file server designed for serving websites
|
||||||
|
---
|
||||||
|
|
||||||
|
If you, like me, have a website, you'll probably need some way of serving it. And if, like me, your website is static, `nginx` is a great, lightweight and insanely fast file server. But, how do you configure it? Sometimes, you just don't care, and want someone else to do it for you - like me!
|
||||||
|
|
||||||
|
{{<block irony >}}
|
||||||
|
This website doesn't actually use this container - It does [something else]({{<relref "website-deployment-process">}}).
|
||||||
|
{{</block>}}
|
||||||
|
|
||||||
|
## Why not just use `nginx:latest`?
|
||||||
|
|
||||||
|
If you're not really bothered, the default [`nginx`](https://hub.docker.com/_/nginx) container will work just fine for you, however this container has a few modifications which make it more suited to serving sites:
|
||||||
|
|
||||||
|
- Use environment variables for customization
|
||||||
|
- Healthcheck endpoint
|
||||||
|
- GZIP and Brotli support
|
||||||
|
- Serve pre-compressed files
|
||||||
|
- Use `X-Forwarded-For` header when getting client IP
|
||||||
|
|
||||||
|
{{% repobutton %}}
|
||||||
|
|
||||||
|
Note this isn't designed to merely serve files. If you want to just serve files, take a look at [`docker-static-server`]({{<relref "docker-static-server">}}).
|
Loading…
Reference in a new issue