Sign inSign up

matipan/static-server

By matipan

Updated about 7 years ago

Lightweight server for static content

Image
0

121

matipan/static-server repository overview

This is a lightweight server for static content written in go. It accepts the following environment variables:

  • READ_TIMEOUT: read timeout for the http server, specified in Go's duration format: 10s, 10ms, 10m and so on
  • WRITE_TIMEOUT: write timeout for the http server, specified in Go's duration format: 10s, 10ms, 10m and so on
  • PUBLISH: the directory that will be published on the root of the server. Default to public
  • PORT: port for the server to listen at. Default 8080

The default working directory of the server is at /home/server. Example for serving the content at /home/server/www on port 8081:

docker run -it -v /host/directory:/home/server/www -e PUBLISH=www -e PORT=8081 -p 8081:8081 matipan/static-server:latest

Tag summary

Content type

Image

Digest

Size

4.6 MB

Last updated

about 7 years ago

docker pull matipan/static-server:0.1.0