Skip to content

Commit

Permalink
update doco
Browse files Browse the repository at this point in the history
  • Loading branch information
John Warburton authored and dadav committed Jun 28, 2024
1 parent ff93a00 commit 944b8bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Flags:
--cache-prefixes string url prefixes to cache (default "/v3/files")
--cors string allowed cors origins separated by comma (default "*")
--dev enables dev mode
--fallback-proxy string optional fallback upstream proxy url
--fallback-proxy string optional comma separated list of fallback upstream proxy urls
-h, --help help for serve
--import-proxied-releases add every proxied modules to local store
--jwt-secret string jwt secret (default "changeme")
Expand All @@ -79,6 +79,9 @@ gorge serve
# use fallback forge and cache request of modules and files
gorge serve --fallback-proxy https://forge.puppetlabs.com --cache-prefixes /v3/files,/v3/modules
# use internal forge server and fallback forge and cache request of modules and files
gorge serve --fallback-proxy https://internal-forge.example.com,https://forge.puppetlabs.com --cache-prefixes /v3/files,/v3/modules
```
## 🍰 Configuration
Expand All @@ -105,7 +108,7 @@ cache-prefixes: /v3/files
cors: "*"
# Enables the dev mode.
dev: false
# Upstream forge to use when local requests return 404
# List of comma separated upstream forge(s) to use when local requests return 404
fallback-proxy:
# Import proxied modules into local backend.
import-proxied-releases: false
Expand Down
4 changes: 2 additions & 2 deletions cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ var serveCmd = &cobra.Command{
Use: "serve",
Short: "Start the puppet forge webserver",
Long: `Run this command to start serving your own puppet modules.
You can also enable a fallback proxy to forward the requests to
You can also enable fallback proxies to forward the requests to
when you don't have the requested module in your local module
set yet.
Expand Down Expand Up @@ -245,7 +245,7 @@ func init() {
serveCmd.Flags().IntVar(&config.ModulesScanSec, "modules-scan-sec", 0, "seconds between scans of directory containing all the modules. (default 0 means only scan at startup)")
serveCmd.Flags().StringVar(&config.Backend, "backend", "filesystem", "backend to use")
serveCmd.Flags().StringVar(&config.CORSOrigins, "cors", "*", "allowed cors origins separated by comma")
serveCmd.Flags().StringVar(&config.FallbackProxyUrl, "fallback-proxy", "", "optional fallback upstream proxy url")
serveCmd.Flags().StringVar(&config.FallbackProxyUrl, "fallback-proxy", "", "optional comma separated list of fallback upstream proxy urls")
serveCmd.Flags().BoolVar(&config.Dev, "dev", false, "enables dev mode")
serveCmd.Flags().StringVar(&config.CachePrefixes, "cache-prefixes", "/v3/files", "url prefixes to cache")
serveCmd.Flags().StringVar(&config.JwtSecret, "jwt-secret", "changeme", "jwt secret")
Expand Down

0 comments on commit 944b8bf

Please sign in to comment.