Skip to content

Commit

Permalink
Merge branch 'update-docs-references' into 'main'
Browse files Browse the repository at this point in the history
chore: add links and update image refs

See merge request BobyMCbobs/go-http-server!37
  • Loading branch information
BobyMCbobs committed Dec 20, 2023
2 parents 5cebb3f + b1393b5 commit ee32fd8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# go-http-server

> A HTTP server for sharing a local folder
# Features
Expand Down
2 changes: 2 additions & 0 deletions docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ FROM registry.gitlab.com/bobymcbobs/go-http-server:latest
ADD mysite /var/run/ko
```

see [usage](./usage.md) for more examples.

With [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane)

```
Expand Down
24 changes: 12 additions & 12 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,21 @@
# Container build

## An instant HTTP server

A webserver, serving on port 8080, can be brought up instantly to share files.

```bash
go install gitlab.com/BobyMCbobs/go-http-server@latest
go-http-server
```

## Simple

Just serve your site

```dockerfile
FROM registry.gitlab.com/bobymcbobs/go-http-server:1.7.0
FROM registry.gitlab.com/bobymcbobs/go-http-server:latest
COPY site /app/site
```

Expand All @@ -16,7 +25,7 @@ COPY site /app/site
Serve your site and set headers

```dockerfile
FROM registry.gitlab.com/bobymcbobs/go-http-server:1.7.0
FROM registry.gitlab.com/bobymcbobs/go-http-server:latest
env APP_HEADER_SET_ENABLE=true \
APP_HEADER_MAP_PATH=./headers.yaml
COPY site /app/site
Expand All @@ -28,7 +37,7 @@ COPY headers.yaml /app/headers.yaml
Serve your site using [history mode](https://router.vuejs.org/guide/essentials/history-mode.html)

```dockerfile
FROM registry.gitlab.com/bobymcbobs/go-http-server:1.7.0
FROM registry.gitlab.com/bobymcbobs/go-http-server:latest
env APP_VUEJS_HISTORY_MODE=true
COPY dist /app/dist
```
Expand Down Expand Up @@ -80,12 +89,3 @@ func main() {
Listen()
}
```

# An instant HTTP server

A webserver, serving on port 8080, can be brought up instantly to share files.

```bash
go install gitlab.com/BobyMCbobs/go-http-server@latest
go-http-server
```

0 comments on commit ee32fd8

Please sign in to comment.