From 3a9bab2fd4b8278455040747e8dd0fe66af6f151 Mon Sep 17 00:00:00 2001 From: Michael Watson Date: Mon, 30 Sep 2024 13:58:34 -0700 Subject: [PATCH 1/3] Add build arg for router version --- Dockerfile | 4 +++- README.md | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d5a6005..76a6b2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,6 @@ -FROM ghcr.io/apollographql/router:v1.55.0 +ARG APOLLO_ROUTER_VERSION="v1.55.0" + +FROM ghcr.io/apollographql/router:${APOLLO_ROUTER_VERSION} COPY router.yaml /config.yaml diff --git a/README.md b/README.md index 04981e7..b273a8a 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ A starting point for deploying the Router via a Dockerfile using [GraphOS Enterp ## Commands - `docker build -t router .` builds the router image with the tag `router` for local testing. + - You can use the `--build-arg APOLLO_ROUTER_VERSION=v1.55.0` to set the version of the Apollo Router docker image you want to use. - `rover dev --supergraph-config supergraph.yaml --router-config router.yaml` to run the Router locally without Docker (using [Rover]). You'll need to update the `supergraph.yaml` file to point at the local versions of your subgraphs. **Make sure to set the required environment variables ahead of time!** - `docker run -it --env APOLLO_KEY --env APOLLO_GRAPH_REF -p4000:4000 router` runs the same router image you'll run in production. You can now query the router at `http://localhost:4000`. - Make sure to set the env vars `APOLLO_KEY` and `APOLLO_GRAPH_REF` first @@ -37,3 +38,5 @@ A starting point for deploying the Router via a Dockerfile using [GraphOS Enterp [GraphOS Enterprise]: https://www.apollographql.com/docs/graphos/enterprise [Rover]: https://www.apollographql.com/docs/rover/commands/dev + +service:Spotify-tb7du2:R2pmWRKslA3ZeuQu2Hslgg From ed50b8cddb94a4cdccf966f804562ba55bf0562c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 20:58:50 +0000 Subject: [PATCH 2/3] Update router config schema --- .apollo/router_config_schema.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.apollo/router_config_schema.json b/.apollo/router_config_schema.json index 1f7bfbf..fb590d4 100644 --- a/.apollo/router_config_schema.json +++ b/.apollo/router_config_schema.json @@ -1650,15 +1650,15 @@ "span_metrics": { "description": "Which spans will be eligible for span stats to be collected for viewing in the APM view. Defaults to true for `request`, `router`, `query_parsing`, `supergraph`, `execution`, `query_planning`, `subgraph`, `subgraph_request` and `http_request`.", "default": { - "execution": true, - "parse_query": true, - "subgraph": true, "router": true, "subgraph_request": true, - "request": true, + "http_request": true, "query_planning": true, + "execution": true, + "request": true, "supergraph": true, - "http_request": true + "subgraph": true, + "parse_query": true }, "type": "object", "additionalProperties": { From 9e039c5b2871b1330c25c68b81575feaa31855f7 Mon Sep 17 00:00:00 2001 From: Michael Watson Date: Mon, 30 Sep 2024 15:09:32 -0700 Subject: [PATCH 3/3] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I purged the key 🤦 --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index b273a8a..796c05c 100644 --- a/README.md +++ b/README.md @@ -38,5 +38,3 @@ A starting point for deploying the Router via a Dockerfile using [GraphOS Enterp [GraphOS Enterprise]: https://www.apollographql.com/docs/graphos/enterprise [Rover]: https://www.apollographql.com/docs/rover/commands/dev - -service:Spotify-tb7du2:R2pmWRKslA3ZeuQu2Hslgg