mirror of
https://github.com/gomods/athens
synced 2026-02-03 08:40:31 +00:00
Doc update to configure upstream proxy to fetch modules from a Go mod… (#1146)
* Doc update to configure upstream proxy to fetch modules from a Go modules repository * review suggestions
This commit is contained in:
committed by
Aaron Schlesinger
parent
58747ed290
commit
c59aa69848
@@ -42,6 +42,11 @@ CloudRuntime = "none"
|
||||
|
||||
# The filename for the include exclude filter.
|
||||
# Env override: ATHENS_FILTER_FILE
|
||||
#
|
||||
# To point Athens to an upstream proxy to fetch modules,
|
||||
# set GlobalEndpoint to "https://<url_to_upstream>"
|
||||
# and also ensure that FilterFile is set to a fully qualified file name
|
||||
# that contains the letter `D` (for "Direct Access") in the first line.
|
||||
FilterFile = ""
|
||||
|
||||
# Timeout is the timeout for external network calls in seconds
|
||||
@@ -70,6 +75,11 @@ Port = ":3000"
|
||||
# The endpoint for a package registry in case of a proxy cache miss
|
||||
# NOTE: Currently no registries have been implemented
|
||||
# Env override: ATHENS_GLOBAL_ENDPOINT
|
||||
#
|
||||
# To point Athens to an upstream proxy to fetch modules,
|
||||
# set GlobalEndpoint to "https://<url_to_upstream>"
|
||||
# and also ensure that FilterFile is set to a fully qualified file name
|
||||
# that contains the letter `D` (for "Direct Access") in the first line.
|
||||
GlobalEndpoint = "http://localhost:3001"
|
||||
|
||||
# BASIC AUTH OPTIONS
|
||||
|
||||
@@ -16,3 +16,9 @@ There are numerous version control systems available to us as developers. In th
|
||||
In Athens we support many storage options. In this section we'll describe how they can be configured
|
||||
|
||||
- [Storage](/configuration/storage)
|
||||
|
||||
|
||||
### Upstream proxy
|
||||
In this section we'll describe how the upstream proxy can be configured to fetch all modules from a Go Modules Repository such as [GoCenter](https://gocenter.io) or another Athens Server.
|
||||
|
||||
- [Upstream](/configuration/upstream)
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
title: Configuring Upstream Proxy to use an Upstream Go Modules Repository
|
||||
description: How to Configure Athens to Fetch Missing Modules From an Upstream Module Repository Like GoCenter, or Another Athens Server
|
||||
weight: 1
|
||||
---
|
||||
|
||||
By default, Athens fetches module code from an upstream VCS like github.com, but this can be configured to use a Go modules repository like GoCenter or another Athens Server.
|
||||
|
||||
1. Create a filter file (e.g ```/usr/local/lib/FilterForGoCenter```) with letter `D` (stands for "direct access") in first line. For more details, please refer to documentation on - [Filtering Modules](/configuration/filter)
|
||||
|
||||
```
|
||||
# FilterFile for fetching modules directly from upstream
|
||||
D
|
||||
```
|
||||
1. If you are not using a config file, create a new config file (based on the sample config.dev.toml) and edit values to match your environment).
|
||||
Additionally in the current or new config file, set the following parameters as suggested:
|
||||
|
||||
```
|
||||
FilterFile = "/usr/local/lib/FilterForGoCenter"
|
||||
GlobalEndpoint = "https://<url_to_uptream>"
|
||||
# To use GoCenter for example, replace <url_to_upstream> with gocenter.io
|
||||
```
|
||||
1. Restart Athens specifying the updated current or new config file.
|
||||
|
||||
```
|
||||
/proxy -config_file <path-to updated current or new configfile>
|
||||
```
|
||||
1. Verify the new configuration using the steps mentioned in ("Try out Athens" document)[/try-out], and go through the same walkthrough example.
|
||||
Reference in New Issue
Block a user