Skip to content

Commit

Permalink
Release v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cjaewon committed Feb 14, 2021
1 parent 40ad506 commit 69d5b4f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,35 @@ Grab the latest binary from the [releases page](https://github.com/cjaewon/serve

#### Start with Docker
```Dockerfile
FROM cjaewon/servekit:0.0.1
FROM cjaewon/servekit:1.0.0
COPY ./static ./static

EXPOSE 3000
```

## Config
You can set a port and serving path with environment variable
### With config file
You can set a port, serving path and etc.. with config file or environment variable.
Servekit scans a `.servekit.toml` at `$HOME`, `.` Directories

- `SERVEKIT_PORT` : default is `:3000`
- `SERVEKIT_PATH` : default is `./static`
```toml
### Config file sample
[server]
port=":3000" # :3000 (default)
path="./static" # ./static (default)

mode="none" # none (default), client-side-rendering
# if you are using client-side-rendering, 404 page will return index.html

with docker, you can set environment variable like below
overview=false # false (default), true
# if your are using true, directory's file list will be show
```

### With environment variable
with docker, you can set environment variable like below. (A undefined config will use a default value)
```Dockerfile
ENV SERVEKIT_PORT :3000
ENV SERVEKIT_PATH ./static
ENV SERVEKIT_SERVER_PORT :3000
ENV SERVEKIT_SERVER_PATH ./static
ENV SERVEKIT_SERVER_MODE none
ENV SERVEKIT_SERVER_OVERVIEW false
```
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN set -eux; \
x86_64) arch='amd64' ;; \
*) echo >&2 "error: unsupported architecture: $apkArch"; exit 1 ;; \
esac; \
wget -O /tmp/servekit.tar.gz "https://github.com/cjaewon/servekit/releases/download/v0.0.1/servekit_0.0.1_linux_$arch.tar.gz"; \
wget -O /tmp/servekit.tar.gz "https://github.com/cjaewon/servekit/releases/download/v1.0.0/servekit_1.0.0_linux_$arch.tar.gz"; \
tar xzvf /tmp/servekit.tar.gz -C /usr/local/bin servekit; \
rm -f /tmp/servekit.tar.gz; \
chmod +x /usr/local/bin/servekit;
Expand All @@ -20,5 +20,5 @@ LABEL org.opencontainers.image.vendor="Cjaewon" \
org.opencontainers.image.url="https://github.com/cjaewon/servekit" \
org.opencontainers.image.title="Servekit" \
org.opencontainers.image.description="Micro HTTP server for serving static files." \
org.opencontainers.image.version="v0.0.1" \
org.opencontainers.image.version="v1.0.0" \
org.opencontainers.image.documentation="https://github.com/cjaewon/servekit/blob/main/README.md"

0 comments on commit 69d5b4f

Please sign in to comment.