Separate out GQL proxy server from uniswap-urbit stack #681

Merged
prathamesh0 merged 6 commits from pm-separate-out-proxy into main 2023-12-06 05:11:10 +00:00
3 changed files with 17 additions and 2 deletions
Showing only changes of commit 437eb27bd3 - Show all commits

View File

@ -3,12 +3,15 @@ version: "3.2"
services:
proxy-server:
image: cerc/watcher-ts:local
restart: unless-stopped
restart: on-failure
working_dir: /app/packages/cli
environment:
ENABLE_PROXY: ${ENABLE_PROXY:-true}
PROXY_UPSTREAM: ${CERC_PROXY_UPSTREAM}
PROXY_ORIGIN_HEADER: ${CERC_PROXY_ORIGIN_HEADER}
command: ["sh", "-c", "yarn proxy"]
command: ["sh", "-c", "./run.sh"]
volumes:
- ../config/proxy-server/run.sh:/app/packages/cli/run.sh
ports:
- "4000"
healthcheck:

View File

@ -0,0 +1,9 @@
#!/bin/sh
if [ "$ENABLE_PROXY" = "true" ]; then
echo "Proxy server enabled"
yarn proxy
else
echo "Proxy server disabled, exiting"
exit 0
fi

View File

@ -46,6 +46,9 @@ laconic-so --stack proxy-server build-containers
* Inside the deployment directory, open the file `config.env` and set the following env variables:
```bash
# Whether to run the proxy server (Optional) (Default: true)
ENABLE_PROXY=
# Upstream endpoint
CERC_PROXY_UPSTREAM=