diff --git a/README.md b/README.md index 393d5b4..61a4b7e 100644 --- a/README.md +++ b/README.md @@ -34,18 +34,20 @@ Usage: gorge serve [flags] Flags: - --api-version string the forge api version to use (default "v3") - --backend string backend to use (default "filesystem") - --bind string host to listen to - --cache-prefixes string url prefixes to cache (default "/v3/files") - --cachedir string cache directory (default "/var/cache/gorge") - --cors string allowed cors origins separated by comma (default "*") - --dev enables dev mode - --fallback-proxy string optional fallback upstream proxy url - -h, --help help for serve - --modulesdir string directory containing all the modules (default "/opt/gorge/modules") - --no-cache disables the caching functionality - --port int the port to listen to (default 8080) + --api-version string the forge api version to use (default "v3") + --backend string backend to use (default "filesystem") + --bind string host to listen to (default "127.0.0.1") + --cache-max-age int max number of seconds responses should be cached (default 86400) + --cache-prefixes string url prefixes to cache (default "/v3/files") + --cachedir string cache directory (default "/var/cache/gorge") + --cors string allowed cors origins separated by comma (default "*") + --dev enables dev mode + --fallback-proxy string optional fallback upstream proxy url + -h, --help help for serve + --import-proxied-releases add every proxied modules to local store + --modulesdir string directory containing all the modules (default "/opt/gorge/modules") + --no-cache disables the caching functionality + --port int the port to listen to (default 8080) Global Flags: --config string config file (default is $HOME/.gorge.yaml) @@ -67,16 +69,31 @@ Use the `$HOME/.config/gorge.yaml` (or `./gorge.yaml`): ```yaml --- +# The forge api version to use. Currently only v3 is supported. api-version: v3 +# The backend type to use. Currently only filesystem is supported. backend: filesystem +# Max seconds to keep the cached responses. +cache-max-age: 86400 +# The host to bind the webservice to. bind: 127.0.0.1 +# The prefixes of requests to cache responses from. Multiple entries must be separated by comma. cache-prefixes: /v3/files +# The directory to write the cached responses to. cachedir: /var/cache/gorge +# Value of the `Access-Control-Allow-Origin` header. cors: "*" +# Enables the dev mode. dev: false +# Upstream forge to use when local requests return 404 fallback-proxy: +# Import proxied modules into local backend. +import-proxied-releases: false +# Path to local modules. modulesdir: /opt/gorge/modules +# Disable cache functionality. no-cache: false +# Port to bind the webservice to. port: 8080 ``` @@ -86,11 +103,13 @@ Or the environment: GORGE_API_VERSION=v3 GORGE_BACKEND=filesystem GORGE_BIND=127.0.0.1 +GORGE_CACHE_MAX_AGE=86400 GORGE_CACHE_PREFIXES=/v3/files GORGE_CACHEDIR=/var/cache/gorge GORGE_CORS="*" GORGE_DEV=false GORGE_FALLBACK_PROXY="" +GORGE_IMPORT_PROXIED_RELEASES=false GORGE_MODULESDIR=/opt/gorge/modules GORGE_NO_CACHE=false GORGE_PORT=8080