diff --git a/stack_orchestrator/data/compose/docker-compose-uniswap-gql-proxy.yml b/stack_orchestrator/data/compose/docker-compose-uniswap-gql-proxy.yml new file mode 100644 index 00000000..65e79a47 --- /dev/null +++ b/stack_orchestrator/data/compose/docker-compose-uniswap-gql-proxy.yml @@ -0,0 +1,15 @@ +version: "3.2" + +services: + uniswap-gql-proxy: + image: cerc/uniswap-interface:local + restart: on-failure + command: ["bash", "-c", "yarn proxy-gql"] + ports: + - "4000" + healthcheck: + test: ["CMD", "nc", "-v", "localhost", "4000"] + interval: 20s + timeout: 5s + retries: 15 + start_period: 10s diff --git a/stack_orchestrator/data/compose/docker-compose-uniswap-interface.yml b/stack_orchestrator/data/compose/docker-compose-uniswap-interface.yml index 6d021961..85b71af2 100644 --- a/stack_orchestrator/data/compose/docker-compose-uniswap-interface.yml +++ b/stack_orchestrator/data/compose/docker-compose-uniswap-interface.yml @@ -12,19 +12,6 @@ services: - app_builds:/app-builds - ../config/uniswap-interface/build-app.sh:/app/build-app.sh - uniswap-gql-proxy: - image: cerc/uniswap-interface:local - restart: on-failure - command: ["bash", "-c", "yarn proxy-gql"] - ports: - - "4000" - healthcheck: - test: ["CMD", "nc", "-v", "localhost", "4000"] - interval: 20s - timeout: 5s - retries: 15 - start_period: 10s - volumes: app_builds: app_globs: diff --git a/stack_orchestrator/data/stacks/uniswap-gql-proxy/README.md b/stack_orchestrator/data/stacks/uniswap-gql-proxy/README.md new file mode 100644 index 00000000..93e74a70 --- /dev/null +++ b/stack_orchestrator/data/stacks/uniswap-gql-proxy/README.md @@ -0,0 +1,64 @@ +# Uniswap GQL Proxy + +Instructions to setup and deploy a Uniswap GQL proxy server + +## Setup + +Clone required repository: + +```bash +laconic-so --stack uniswap-gql-proxy setup-repositories --pull + +# If this throws an error as a result of being already checked out to a branch/tag in a repo, remove the repositories mentioned below and re-run the command +``` + +Build the container image: + +```bash +laconic-so --stack uniswap-gql-proxy build-containers +``` + +## Create a deployment + +First, create a spec file for the deployment, which will allow mapping the stack's ports and volumes to the host: + +```bash +laconic-so --stack uniswap-gql-proxy deploy init --output uniswap-gql-proxy-spec.yml +``` + +Edit `network` in spec file to map container ports to same ports in host: + +``` +... +network: + ports: + uniswap-gql-proxy: + - '4000:4000' +... +``` + +Once you've made any needed changes to the spec file, create a deployment from it: + +```bash +laconic-so --stack uniswap-gql-proxy deploy create --spec-file uniswap-gql-proxy-spec.yml --deployment-dir uniswap-gql-proxy-deployment +``` + +## Start the stack + +Start the deployment: + +```bash +laconic-so deployment --dir uniswap-gql-proxy-deployment start +``` + +* List and check the health status of the container using `docker ps` + +* The Uniswap GQL server will now be listening at http://localhost:4000 + +## Clean up + +To stop the service running in background: + +```bash +laconic-so deployment --dir uniswap-gql-proxy-deployment stop +``` diff --git a/stack_orchestrator/data/stacks/uniswap-gql-proxy/stack.yml b/stack_orchestrator/data/stacks/uniswap-gql-proxy/stack.yml new file mode 100644 index 00000000..dee96df5 --- /dev/null +++ b/stack_orchestrator/data/stacks/uniswap-gql-proxy/stack.yml @@ -0,0 +1,8 @@ +version: "0.1" +name: uniswap-gql-proxy +repos: + - github.com/cerc-io/uniswap-interface@laconic # TODO: Use release +containers: + - cerc/uniswap-interface +pods: + - uniswap-gql-proxy diff --git a/stack_orchestrator/data/stacks/uniswap-urbit-app/README.md b/stack_orchestrator/data/stacks/uniswap-urbit-app/README.md index 55a37338..ac0c7e37 100644 --- a/stack_orchestrator/data/stacks/uniswap-urbit-app/README.md +++ b/stack_orchestrator/data/stacks/uniswap-urbit-app/README.md @@ -120,7 +120,7 @@ laconic-so deployment --dir uniswap-urbit-app-deployment start ## Clean up -To stop all uniswap-urbit-app services running in the background, while preserving chain data: +To stop all uniswap-urbit-app services running in the background, while preserving data: ```bash laconic-so deployment --dir uniswap-urbit-app-deployment stop diff --git a/stack_orchestrator/data/stacks/uniswap-urbit-app/stack.yml b/stack_orchestrator/data/stacks/uniswap-urbit-app/stack.yml index 1077b557..13e8bc4f 100644 --- a/stack_orchestrator/data/stacks/uniswap-urbit-app/stack.yml +++ b/stack_orchestrator/data/stacks/uniswap-urbit-app/stack.yml @@ -7,4 +7,5 @@ containers: - cerc/urbit-globs-host pods: - uniswap-interface + - uniswap-gql-proxy - uniswap-urbit