# HG changeset patch # User Chaiwat Suttipongsakul # Date 1646899544 -25200 # Thu Mar 10 15:05:44 2022 +0700 # Node ID acef93a3cbc60f070bfbf64d8528b0aff7b2dc58 # Parent 7d101f7da9eec21a5e27ca9273b9658c94f965d8 Update README.md add usage instructions diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -2,3 +2,32 @@ [![Docker Repository on Quay](https://quay.io/repository/bashell/alpine-lighttpd/status "Docker Repository on Quay")](https://quay.io/repository/bashell/alpine-lighttpd) - Based on [Alpine-Bash](https://quay.io/repository/bashell/alpine-bash) - Source code is on [GitHub](https://github.com/bashell-com/alpine-lighttpd) + +## Usage +*(If you're using **Docker™**, please change command `podman` to `docker`.)* + +### Configuration and Data Storage +Assume that you want to store data on `/data`, and it is *writable*, then extract default configuration files from the image using this command: +```console +mkdir -p /data/lighttpd/etc +mkdir -p /data/lighttpd/htdocs +mkdir -p /data/lighttpd/lib/cache/compress +cd /data/lighttpd/etc +podman run --rm yyy tar c -C /etc/lighttpd -O . | tar xvf - +``` +You should review and edit `lighttpd.conf` *before* next step. + +### Run +```console +podman run -d --name=lighttpd \ + -v /data/lighttpd/etc:/etc/lighttpd \ + -v /data/lighttpd/htdocs:/var/www/localhost/htdocs \ + -v /data/lighttpd/lib:/var/lib/lighttpd \ + -P \ + quay.io/bashell/alpine-lighttpd +``` + +### Log +```console +podman logs -f lighttpd +```