diff --git a/.changesets/docs_lambertjosh_readd_graph_docs.md b/.changesets/docs_lambertjosh_readd_graph_docs.md new file mode 100644 index 0000000000..bb158f1742 --- /dev/null +++ b/.changesets/docs_lambertjosh_readd_graph_docs.md @@ -0,0 +1,5 @@ +### Add back the graph artifact documentation for the containers [PR #7752](hhttps://github.com/apollographql/router/pull/7752) + +Adds back accidentally overwritten docs which occurred in PR 7734. The missing commit added graph artifact usage information. + +By [lambertjosh](https://github.com/lambertjosh) in https://github.com/apollographql/router/pull/7752 \ No newline at end of file diff --git a/docs/source/routing/self-hosted/containerization/docker-router-only.mdx b/docs/source/routing/self-hosted/containerization/docker-router-only.mdx index 21b1d1233e..c57775bd17 100644 --- a/docs/source/routing/self-hosted/containerization/docker-router-only.mdx +++ b/docs/source/routing/self-hosted/containerization/docker-router-only.mdx @@ -133,7 +133,11 @@ The router runs under the control of [heaptrack](https://github.com/KDE/heaptrac ## Specifying the supergraph -If you don't want to automatically update your supergraph via [Apollo Uplink](/federation/managed-federation/uplink/), or you don't have connectivity to access Apollo Uplink from your environment, you can manually specify the details of your supergraph in a `docker run` command: +If you don't want to automatically update your supergraph via [Apollo Uplink](/federation/managed-federation/uplink/), or you don't have connectivity to access Apollo Uplink from your environment, you have two options: + +### Using a local supergraph file + +You can manually specify the details of your supergraph in a `docker run` command: ```bash docker run -p 4000:4000 \ @@ -144,6 +148,20 @@ docker run -p 4000:4000 \ In this example, we have to mount the local definition of the supergraph into our image, _and_ specify the location of the file. It doesn't have to be mounted in the `/dist/schema` directory, but it's a reasonable location to use. We must specify the configuration file location as well, since overriding the default params will override our default config file location. In this case, since we don't want to change our router configuration but want to make sure it's used, we just specify the default location of the default configuration. +### Using an OCI image reference + +You can use the `--graph-artifact-reference` option to fetch the supergraph schema from an OCI image: + +```bash +docker run -p 4000:4000 \ + --env APOLLO_KEY="" \ + --env GRAPH_ARTIFACT_REFERENCE="" \ + --rm \ + ghcr.io/apollographql/router: +``` + +When using this option, the router will fetch the schema from the specified OCI image instead of using Apollo Uplink. + ## Building your own container diff --git a/docs/source/routing/self-hosted/containerization/docker.mdx b/docs/source/routing/self-hosted/containerization/docker.mdx index 9138d94b11..0a2751f614 100644 --- a/docs/source/routing/self-hosted/containerization/docker.mdx +++ b/docs/source/routing/self-hosted/containerization/docker.mdx @@ -69,7 +69,7 @@ docker run -p 4000:4000 \ --env APOLLO_KEY="" \ -v <>:/config --rm \ - ghcr.io/apollographql/apollo-runtime: + ghcr.io/apollographql/apollo-runtime: ``` You can also mount specific files, for example the schema file, by specifying: @@ -90,6 +90,27 @@ Both local and container paths must be specified as absolute paths. +## Specifying the supergraph + +If you don't want to automatically update your supergraph via [Apollo Uplink](/federation/managed-federation/uplink/), or you don't have connectivity to access Apollo Uplink from your environment, you have two options: + +1. Using a local supergraph file, as documented in the [Configuring using local files](#configuring-using-local-files) section. +1. Using an [OCI image reference](#using-an-oci-image-reference) + +### Using an OCI image reference + +You can use the `GRAPH_ARTIFACT_REFERENCE` environment variable to fetch the supergraph schema from an OCI image: + +```bash +docker run -p 4000:4000 \ + --env APOLLO_KEY="" \ + --env GRAPH_ARTIFACT_REFERENCE="" \ + --rm \ + ghcr.io/apollographql/apollo-runtime: +``` + +When using this option, the router will fetch the schema from the specified OCI image instead of using Apollo Uplink. Additional information on graph artifacts is available in the [router CLI options documentation](/docs/graphos/routing/configuration/cli#command-line-options). + ## Running a specific Router and MCP version The container has a tagging scheme that consists of three parts, the container version, the Apollo Router version, and the MCP Server version, each separated by underscores.