https://github.com/byjg/docker-static-httpserver
Really minimal HTTP Server for static files written in GO
https://github.com/byjg/docker-static-httpserver
go golang http-server httpserver static static-site
Last synced: 5 months ago
JSON representation
Really minimal HTTP Server for static files written in GO
- Host: GitHub
- URL: https://github.com/byjg/docker-static-httpserver
- Owner: byjg
- License: mit
- Created: 2020-07-16T07:02:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-05T02:30:44.000Z (over 1 year ago)
- Last Synced: 2024-10-19T08:13:58.074Z (about 1 year ago)
- Topics: go, golang, http-server, httpserver, static, static-site
- Language: CSS
- Homepage:
- Size: 2.95 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Static http server
[](https://github.com/byjg/docker-static-httpserver/actions/workflows/build.yml)
[](http://opensource.byjg.com)
[](https://github.com/byjg/docker-static-httpserver/)
[](https://opensource.byjg.com/opensource/licensing.html)
[](https://github.com/byjg/docker-static-httpserver/releases/)
A really minimal HTTP Server image for static files written in GO
## Why?
* Create a simple HTML website;
* HTTP to serve few files
* Really small - less than 15MB !!
## Tags
* latest - The latest image with a coming soon template
* tiny - A really minimalist image. You need to replace the volume ot build your own on top of this one.
## How to use the "Coming soon template"?

The image has the coming soon template and can be customized by setting the environment variables:
* HTML_TITLE
* TITLE
* MESSAGE
* BG_IMAGE
* FACEBOOK
* TWITTER
* YOUTUBE
e.g.
```bash
docker run -p 8080:8080 -e TITLE=soon -e "MESSAGE=Keep In Touch" byjg/static-httpserver
```
## Using with Helm 3
3.2. Using HELM 3
Minimal configuration
```bash
helm repo add byjg https://opensource.byjg.com/helm
helm repo update
helm upgrade --install mysite byjg/static-httpserver \
--namespace default \
--set "ingress.hosts={www.example.org,example.org}" \
--set parameters.title=Welcome
```
Parameters:
```yaml
ingress:
hosts: [] # Required
parameters:
htmlTitle: ""
title: "soon"
message: ""
backgroundImage: ""
facebook: ""
twitter: ""
youtube: ""
```
```tip
This HELM package is setup to work with [EasyHAProxy](https://github.com/byjg/docker-easy-haproxy)
```
## Enabling as Addon on MicroK8s
The Parking addon deploys a static webserver to ‘park’ a domain. This involves all
necessary ingress, service and Pods. This addon adds the proper labels which can be
discovered by EasyHAProxy.
To enable this addon:
```
microk8s enable parking
```
… where domainlist is the comma separated list of domains to be parked.
To disable the addon:
```
microk8s disable parking
```
Follow this discussion: [https://discuss.kubernetes.io/t/addon-parking/23186](https://discuss.kubernetes.io/t/addon-parking/23186)
## Use your own static pages
```
docker run -p 8080:8080 -v /path/to/local/html:/static byjg/static-httpserver:tiny
```
## Create your own image
Dockerfile
```
FROM byjg/static-httpserver:tiny
COPY /path/to/html /static
```
----
[Open source ByJG](http://opensource.byjg.com)