Skip to content

Commit

Permalink
configuraiton of remote download proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
LongLiveCHIEF committed Nov 6, 2024
1 parent 074527b commit 83c7134
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/source/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Hello! This tutorial walks you through installing the router (GraphOS Router or

If you have a bash-compatible terminal, you can download the latest version of the Apollo Router Core directly to your current directory with the following command:

\*Note: If you are behind a network proxy, set `APOLLO_ROUTER_DOWNLOAD_REMOTE` first. see: ([configuring a proxy for the binary download](#configuring-a-proxy-for-the-binary-download))\*

```bash
curl -sSL https://router.apollo.dev/download/nix/latest | sh
```
Expand Down Expand Up @@ -265,6 +267,29 @@ That's it! Running the router with the `--dev` flag enables a development mode t

Visit `http://127.0.0.1:4000` to open Apollo Sandbox, inspect your entire supergraph, and run your first queries!

## Configuring a Proxy for the Binary Download

The installer from step 1 downloads from github, and can be configured to support a proxy artifact repository by
setting the `APOLLO_ROUTER_DOWNLOAD_REMOTE` environment variable to point to your artifact proxy repository
for this github repositories releases/download path on your proxy.

For example, if your artifact proxy mirror has a hostname of `my-artifact-mirror`, and the proxy for github
is available at `my-artifact-mirror.com/artifacts/github-com`, you would want to set the value of
`APOLLO_ROUTER_DOWNLOAD_REMOTE` like so:

```bash
export APOLLO_ROUTER_DOWNLOAD_REMOTE="https://my-artifact-mirror.com/artifacts/github-com/apollograpqhl/router/releases/download"
# proceed to run installation script
curl -sSL https://router.apollo.dev/download/nix/latest | sh
```

If your remote proxy requires authentication, you can configure that as part of the remote connection string.
Be aware that this will cause the password to appear in plaintext in the command output:

```bash
export APOLLO_ROUTER_DOWNLOAD_REMOTE="https://<user>:<password>@myartifact-mirror...."
```

## Next steps

Now that you know how to run the router with a supergraph schema, you can:
Expand Down

0 comments on commit 83c7134

Please sign in to comment.