Skip to content

Commit

Permalink
Merge pull request #7 from halverneus/chore/go_1_11_0
Browse files Browse the repository at this point in the history
Updated to Go 1.11.0. Cleaned up README. Updated version of dep.
  • Loading branch information
halverneus authored Sep 5, 2018
2 parents 24c4662 + 48bf7cd commit 5d945a7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.10.3 as builder
FROM golang:1.11.0 as builder

ENV BUILD_DIR /go/src/github.com/halverneus/static-file-server
ENV MAIN github.com/halverneus/static-file-server/bin/serve
ENV DEP_VERSION v0.4.1
ENV DEP_VERSION v0.5.0

RUN curl -fsSL -o /usr/local/bin/dep \
https://github.com/golang/dep/releases/download/$DEP_VERSION/dep-linux-amd64 && \
Expand Down
4 changes: 3 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# static-file-server

Tiny, simple static file server using environment variables for configuration

Available on Docker Hub at https://hub.docker.com/r/halverneus/static-file-server/
Available on GitHub at https://github.com/halverneus/static-file-server

Environment variables with defaults:

```bash
# Optional Hostname for binding. Leave black to accept any incoming HTTP request
# on the prescribed port.
Expand Down Expand Up @@ -40,27 +43,34 @@ tls-cert: ""
tls-key: ""
```
### Without Docker
## Without Docker
```bash
PORT=8888 FOLDER=. ./serve
```

Files can then be accessed by going to http://localhost:8888/my/file.txt

### With Docker
## With Docker

```bash
docker run -d -v /my/folder:/web -p 8080:8080 halverneus/static-file-server:latest
```

This will serve the folder "/my/folder" over http://localhost:8080/my/file.txt

Any of the variables can also be modified:

```bash
docker run -d -v /home/me/dev/source:/content/html -v /home/me/dev/files:/content/more/files -e FOLDER=/content -p 8080:8080 halverneus/static-file-server:latest
```

### Also try...
## Also try...

```bash
./serve help
# OR
docker run -it halverneus/static-file-server:latest help
```

This maybe a cheesy program, but it is convenient and less than 6MB in size.
4 changes: 2 additions & 2 deletions cli/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ var (
MinorVersion = 3

// FixVersion of static-file-server.
FixVersion = 0
FixVersion = 1

// Text for directly accessing the static-file-server version.
Text = fmt.Sprintf(
"Version %d.%d.%d",
"v%d.%d.%d",
MajorVersion,
MinorVersion,
FixVersion,
Expand Down

0 comments on commit 5d945a7

Please sign in to comment.