diff --git a/docs/content/configuration/download.md b/docs/content/configuration/download.md index c5d800b7..775469ef 100644 --- a/docs/content/configuration/download.md +++ b/docs/content/configuration/download.md @@ -4,9 +4,14 @@ description: What to do when a module is not in storage weight: 2 --- -Athens accepts an HCL formatted Download File that serves as the source of truth for answering the following question: +Athens accepts an HCL formatted Download File that has instructions for how it should behave when a module@version isn't found in its storage. -### What should Athens do when a module@version is not found in storage? +You configure this download file by setting the `ATHENS_DOWNLOAD_MODE` environment variable in one of two ways: + +1. Set its value to `file:$FILE_PATH`, where `FILE_PATH` is the path to the HCL file +1. Set its value to `custom$BASE_64` where `BASE_64` is the base64 encoded HCL file + +## What should Athens do when a module@version is not found in storage? Say a client sends an HTTP request with the path `/github.com/pkg/errors/@v/v0.8.1` and Athens does not have this module in storage. Athens will look at the Download File for one of the following Modes: @@ -59,4 +64,4 @@ If you have limited storage, then it might be a good idea to only persist some m **Limited resources:** -If you are running Athens with low memory/cpu, then you can redirect all public modules to proxy.golang.org but asynchronously fetch them so that the client does not timeout. At the same time, you can return a 404 for private modules through the `none` mode and let the client (the Go command) fetch private modules directly through `GOPROXY=,direct` \ No newline at end of file +If you are running Athens with low memory/cpu, then you can redirect all public modules to proxy.golang.org but asynchronously fetch them so that the client does not timeout. At the same time, you can return a 404 for private modules through the `none` mode and let the client (the Go command) fetch private modules directly through `GOPROXY=,direct`