mirror of
https://github.com/halverneus/static-file-server.git
synced 2024-11-13 21:55:31 +00:00
Merge pull request #22 from halverneus/dev
Upgraded to Go 1.11.5 and README updates
This commit is contained in:
commit
c627e0d349
@ -1,9 +1,9 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
## GO BUILDER
|
## GO BUILDER
|
||||||
################################################################################
|
################################################################################
|
||||||
FROM golang:1.11.3 as builder
|
FROM golang:1.11.5 as builder
|
||||||
|
|
||||||
ENV VERSION 1.6.0
|
ENV VERSION 1.6.1
|
||||||
ENV BUILD_DIR /build
|
ENV BUILD_DIR /build
|
||||||
|
|
||||||
RUN mkdir -p ${BUILD_DIR}
|
RUN mkdir -p ${BUILD_DIR}
|
||||||
@ -31,5 +31,5 @@ LABEL life.apets.vendor="Halverneus" \
|
|||||||
life.apets.url="https://github.com/halverneus/static-file-server" \
|
life.apets.url="https://github.com/halverneus/static-file-server" \
|
||||||
life.apets.name="Static File Server" \
|
life.apets.name="Static File Server" \
|
||||||
life.apets.description="A tiny static file server" \
|
life.apets.description="A tiny static file server" \
|
||||||
life.apets.version="v1.5.1" \
|
life.apets.version="v1.6.1" \
|
||||||
life.apets.schema-version="1.0"
|
life.apets.schema-version="1.0"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
FROM golang:1.11.3 as builder
|
FROM golang:1.11.5 as builder
|
||||||
|
|
||||||
ENV VERSION 1.6.0
|
ENV VERSION 1.6.1
|
||||||
ENV BUILD_DIR /build
|
ENV BUILD_DIR /build
|
||||||
|
|
||||||
RUN mkdir -p ${BUILD_DIR}
|
RUN mkdir -p ${BUILD_DIR}
|
||||||
@ -21,5 +21,5 @@ LABEL life.apets.vendor="Halverneus" \
|
|||||||
life.apets.url="https://github.com/halverneus/static-file-server" \
|
life.apets.url="https://github.com/halverneus/static-file-server" \
|
||||||
life.apets.name="Static File Server" \
|
life.apets.name="Static File Server" \
|
||||||
life.apets.description="A tiny static file server" \
|
life.apets.description="A tiny static file server" \
|
||||||
life.apets.version="v1.5.1" \
|
life.apets.version="v1.6.1" \
|
||||||
life.apets.schema-version="1.0"
|
life.apets.schema-version="1.0"
|
||||||
|
24
README.md
24
README.md
@ -17,24 +17,31 @@ Default values are shown with the associated environment variable.
|
|||||||
# Enable debugging for troubleshooting. If set to 'true' this prints extra
|
# Enable debugging for troubleshooting. If set to 'true' this prints extra
|
||||||
# information during execution.
|
# information during execution.
|
||||||
DEBUG=false
|
DEBUG=false
|
||||||
|
|
||||||
# Optional Hostname for binding. Leave black to accept any incoming HTTP request
|
# Optional Hostname for binding. Leave black to accept any incoming HTTP request
|
||||||
# on the prescribed port.
|
# on the prescribed port.
|
||||||
HOST=
|
HOST=
|
||||||
|
|
||||||
# If assigned, must be a valid port number.
|
# If assigned, must be a valid port number.
|
||||||
PORT=8080
|
PORT=8080
|
||||||
|
|
||||||
# Automatically serve the index file for a given directory (default). If set to
|
# Automatically serve the index file for a given directory (default). If set to
|
||||||
# 'false', URLs ending with a '/' will return 'NOT FOUND'.
|
# 'false', URLs ending with a '/' will return 'NOT FOUND'.
|
||||||
SHOW_LISTING=true
|
SHOW_LISTING=true
|
||||||
|
|
||||||
# Folder with the content to serve.
|
# Folder with the content to serve.
|
||||||
FOLDER=/web
|
FOLDER=/web
|
||||||
|
|
||||||
# URL path prefix. If 'my.file' is in the root of $FOLDER and $URL_PREFIX is
|
# URL path prefix. If 'my.file' is in the root of $FOLDER and $URL_PREFIX is
|
||||||
# '/my/place' then file is retrieved with 'http://$HOST:$PORT/my/place/my.file'.
|
# '/my/place' then file is retrieved with 'http://$HOST:$PORT/my/place/my.file'.
|
||||||
URL_PREFIX=
|
URL_PREFIX=
|
||||||
|
|
||||||
# Paths to the TLS certificate and key. If one is set then both must be set. If
|
# Paths to the TLS certificate and key. If one is set then both must be set. If
|
||||||
# both set then files are served using HTTPS. If neither are set then files are
|
# both set then files are served using HTTPS. If neither are set then files are
|
||||||
# served using HTTP.
|
# served using HTTP.
|
||||||
TLS_CERT=
|
TLS_CERT=
|
||||||
TLS_KEY=
|
TLS_KEY=
|
||||||
|
|
||||||
# List of accepted HTTP referrers. Return 403 if HTTP header `Referer` does not
|
# List of accepted HTTP referrers. Return 403 if HTTP header `Referer` does not
|
||||||
# match prefixes provided in the list.
|
# match prefixes provided in the list.
|
||||||
# Examples:
|
# Examples:
|
||||||
@ -53,16 +60,25 @@ the path to the configuration file using the command line option
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
debug: false
|
debug: false
|
||||||
|
folder: /web
|
||||||
host: ""
|
host: ""
|
||||||
port: 8080
|
port: 8080
|
||||||
|
referrers: []
|
||||||
show-listing: true
|
show-listing: true
|
||||||
folder: /web
|
|
||||||
url-prefix: ""
|
|
||||||
tls-cert: ""
|
tls-cert: ""
|
||||||
tls-key: ""
|
tls-key: ""
|
||||||
|
url-prefix: ""
|
||||||
|
```
|
||||||
|
|
||||||
|
Example configuration with possible alternative values:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
debug: true
|
||||||
|
folder: /var/www
|
||||||
|
port: 80
|
||||||
referrers:
|
referrers:
|
||||||
- http://localhost
|
- http://localhost
|
||||||
- https://my.site
|
- https://mydomain.com
|
||||||
```
|
```
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
Loading…
Reference in New Issue
Block a user