index : static-web-server.git

ascending towards madness

author Jose Quintana <joseluisquintana20@gmail.com> 2021-07-09 21:22:58.0 +00:00:00
committer Jose Quintana <joseluisquintana20@gmail.com> 2021-07-09 21:22:58.0 +00:00:00
commit
18de7fd485717efa3fc04a9f0a6a12464541461f [patch]
tree
f301ac8ab2528cdf73aaa4569d294bf96fcb06ec
parent
70a76ed58b63579802887051e01eb8580549bdaf
download
18de7fd485717efa3fc04a9f0a6a12464541461f.tar.gz

v2.0.0-beta.7



Diff

 Cargo.lock |  2 +-
 Cargo.toml |  2 +-
 README.md  | 55 +++++++++++++++++++++++++++++++++++++++----------------
 3 files changed, 41 insertions(+), 18 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index bc003c9..2c68a75 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -852,7 +852,7 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"

[[package]]
name = "static-web-server"
version = "2.0.0-beta.6"
version = "2.0.0-beta.7"
dependencies = [
 "anyhow",
 "async-compression",
diff --git a/Cargo.toml b/Cargo.toml
index 23ed597..45e40a6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "static-web-server"
version = "2.0.0-beta.6"
version = "2.0.0-beta.7"
authors = ["Jose Quintana <https://git.io/joseluisq>"]
license = "MIT OR Apache-2.0"
description = "A blazing fast and asynchronous web server for static files-serving."
diff --git a/README.md b/README.md
index 0aa966d..93c1e61 100644
--- a/README.md
+++ b/README.md
@@ -100,7 +100,7 @@ Server can be configured either via environment variables or their equivalent co
CLI arguments listed with `static-web-server -h`.

```
static-web-server 2.0.0-beta.6
static-web-server 2.0.0-beta.7
Jose Quintana <https://git.io/joseluisq>
A blazing fast and asynchronous web server for static files-serving.

@@ -175,34 +175,57 @@ option.
Alternatively, the light-weight [`systemfd`]https://github.com/mitsuhiko/systemfd utility may be
useful - especially for testing e.g. `systemfd --no-pid -s http::8091 -- path/to/static-web-server --fd 0`

## Docker stack
## Docker

Example using [Traefik Proxy]https://traefik.io/:
### Run a container

```sh
# Scratch image (just the binary)
docker run --rm -it -p 8787:80 joseluisq/static-web-server:2.0.0-beta.7

# Or Alpine image
docker run --rm -it -p 8787:80 joseluisq/static-web-server:2.0.0-beta.7-alpine
```

### Dockerfile

```Dockerfile
# Scratch image (just the binary)
FROM joseluisq/static-web-server:2.0.0-beta.7

# Or Alpine image
FROM joseluisq/static-web-server:2.0.0-beta.7-alpine
```

### Docker stack

[Docker Compose]https://docs.docker.com/compose/ example using [Traefik Proxy]https://traefik.io/:

```yaml
version: "3.3"

services:
  web:
    image: joseluisq/static-web-server:2.0.0-beta.4
    image: joseluisq/static-web-server:2.0.0-beta.7
    environment:
        - SERVER_HOST=127.0.0.1
        - SERVER_PORT=80
        - SERVER_ROOT=/public
      # Note: those envs are customizable but also optional
      - SERVER_HOST=127.0.0.1
      - SERVER_PORT=80
      - SERVER_ROOT=/public
    volumes:
        - ./some-dir-path:/public
      - ./some-dir-path:/public
    labels:
        - "traefik.enable=true"
        - "traefik.frontend.entryPoints=https"
        - "traefik.backend=localhost_dev"
        - "traefik.frontend.rule=Host:localhost.dev"
        - "traefik.port=80"
      - "traefik.enable=true"
      - "traefik.frontend.entryPoints=https"
      - "traefik.backend=localhost_dev"
      - "traefik.frontend.rule=Host:localhost.dev"
      - "traefik.port=80"
    networks:
        - traefik_net
      - traefik_net

networks:
    traefik_net:
        external: true
  traefik_net:
    external: true
```

## Contributions