Add stack for building uniswap frontend app

This commit is contained in:
Nabarun 2023-11-29 19:05:32 +05:30
parent fc2a1445ea
commit e935cf011c
7 changed files with 64 additions and 5 deletions

View File

@ -0,0 +1,23 @@
version: "3.2"
services:
uniswap-interface:
image: cerc/uniswap-interface:local
restart: unless-stopped
environment:
- REACT_APP_INFURA_KEY=${CERC_INFURA_KEY}
command: ["./build.sh"]
volumes:
- uniswap_build:/app/build
- ../config/uniswap-frontend/build.sh:/app/build.sh
ports:
- "3000"
healthcheck:
test: ["CMD", "nc", "-vz", "localhost", "3000"]
interval: 20s
timeout: 5s
retries: 15
start_period: 5s
volumes:
uniswap_build:

View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
yarn build
# Create symlink to host built files with correct URL path
mkdir ./urbit/apps
ln -s ./build/ ./urbit/apps/uniswap
yarn serve build -s -l 3000

View File

@ -0,0 +1,10 @@
FROM node:18.17.1-alpine3.18
RUN apk --update --no-cache add git make alpine-sdk bash
WORKDIR /app
COPY . .
RUN echo "Building uniswap-interface" && \
yarn

View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Build the uniswap-interface image
source ${CERC_CONTAINER_BASE_DIR}/build-base.sh
# See: https://stackoverflow.com/a/246128/1701505
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
docker build -t cerc/uniswap-interface:local -f ${SCRIPT_DIR}/Dockerfile ${build_command_args} ${CERC_REPO_BASE_DIR}/uniswap-interface

View File

@ -59,3 +59,4 @@ cerc/ponder
cerc/nitro-rpc-client
cerc/watcher-merkl-sushiswap-v3
cerc/watcher-sushiswap-v3
cerc/uniswap-interface

View File

@ -49,3 +49,4 @@ github.com/cerc-io/mobymask-snap
github.com/cerc-io/ponder
github.com/cerc-io/merkl-sushiswap-v3-watcher-ts
github.com/cerc-io/sushiswap-v3-watcher-ts
github.com/cerc-io/uniswap-interface

View File

@ -1,10 +1,12 @@
version: "0.1"
name: urbit-frontend
repos:
# Uniswap frontend
- github.com/cerc-io/uniswap-interface
# Uniswap interface
# TODO: Use release
- github.com/cerc-io/uniswap-interface@pm-urbit-hosting
containers:
- cerc/uniswap-interface
# TODO: Add container foi urbit
# pods:
# TODO: Add compose file and pods
# TODO: Add container for urbit
pods:
- uniswap-interface
# TODO: Add pod for urbit