Konubinix' opinionated web of thoughts

Simple Web Server in Docker

Fleeting

simple web server in docker

docker:
    FROM FROM joseluisq/static-web-server:2.20-alpine
    COPY ./sws.toml /
    WORKDIR /public
    COPY +build/build/ /public/
    CMD static-web-server --config-file /sws.toml --page-fallback /public/index.html
    ARG --required ref
    ARG extra_ref
    SAVE IMAGE --push ${ref} ${extra_ref}
[general]

port = 80
root = "/public"
log-level = "info"
cache-control-headers = false
# we want to serve the pre-compressed files, but don't want to compress them on the fly
compression = false
compression-static = true
cors-allow-origins = "*"
health = true

[advanced]
[[advanced.headers]]
source = "**/*"
headers.Cache-Control = "no-cache, max-age=2592000"