56 lines
2.4 KiB
Plaintext
56 lines
2.4 KiB
Plaintext
# this is only for use as part of the API Gateway experiment
|
|
# and is not yet a widely supported tool for general canvas development.
|
|
#
|
|
# If you are trying to develop or debug an experimental API gateway workflow
|
|
# you will need to copy this file into a local ./docker-compose/api-gateway.override.yml file.
|
|
#
|
|
# 1) replace the image values for both service definitions below with the SAME image version.
|
|
#
|
|
# 2) match keypairs between canvas and the api gateway for signing and encryption (they should be
|
|
# different keypairs, you can just RSA generate new ones).
|
|
# The canvas side of each keypair should be stored in config/vault_contents.yml.
|
|
# See config/vault_contents.yml.example for example.
|
|
# private signing key for canvas gets matched to INST_ACCESS_SIGNING_PUBLIC_KEY here.
|
|
# public encryption key for canvas gets matched to INST_ACCESS_PRIVATE_KEY here.
|
|
#
|
|
# 3) use dynamic settings to configure your api-gateway url. If you aren't changing
|
|
# any of the virtual hosts you should be able to just uncomment
|
|
# api_gateway_enabled and api_gateway_uri in the private tree in docker-compose/config/dynamic_settings.yml
|
|
# and make sure that change makes it into your config/dynamic_settings.yml file on disk for your running
|
|
# canvas instance
|
|
version: "3.3"
|
|
services:
|
|
gateway:
|
|
image: <image-name>
|
|
ports:
|
|
- "4455:4455"
|
|
- "9229:9229" # debug port
|
|
command: ["npm", "run", "gateway:debug"]
|
|
depends_on:
|
|
- subgraph
|
|
environment:
|
|
# APOLLO_KEY is an Apollo Studio API key, to be provided as an env var in
|
|
# the shell that launches this docker-compose service.
|
|
APOLLO_KEY:
|
|
INST_ACCESS_PRIVATE_KEY: <base64-must-match-canvas-public-encryption>
|
|
INST_ACCESS_SIGNING_PUBLIC_KEY: <base64-must-match-canvas-private-signing>
|
|
APP_HOME: /usr/src/app
|
|
VIRTUAL_HOST: inst-gateway.docker
|
|
VIRTUAL_PORT: 4455
|
|
APOLLO_PORT: 4455
|
|
GATEWAY_ENV: "development"
|
|
INST_SUBGRAPH_URL: "http://subgraph:4456/graphql"
|
|
CANVAS_SUBGRAPH_URL: "http://canvas.docker/api/graphql/subgraph"
|
|
subgraph:
|
|
image: <image-name>
|
|
ports:
|
|
- "4456:4456"
|
|
- "9228:9228" # debug port
|
|
command: ["npm", "run", "subgraph:debug"]
|
|
environment:
|
|
INST_ACCESS_SIGNING_PUBLIC_KEY: <base64-must-match-canvas-private-signing>
|
|
APP_HOME: /usr/src/app
|
|
VIRTUAL_HOST: inst-gateway-subgraph.docker
|
|
VIRTUAL_PORT: 4456
|
|
APOLLO_PORT: 4456
|
|
GATEWAY_ENV: "development" |