Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build arg for router version #56

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .apollo/router_config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down