forked from cerc-io/stack-orchestrator
relay
This commit is contained in:
parent
0cd90ad3dc
commit
7cce68959f
@ -76,6 +76,7 @@ services:
|
|||||||
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
|
CERC_NA_ADDRESS: ${CERC_NA_ADDRESS}
|
||||||
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}
|
CERC_VPA_ADDRESS: ${CERC_VPA_ADDRESS}
|
||||||
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}
|
CERC_CA_ADDRESS: ${CERC_CA_ADDRESS}
|
||||||
|
CERC_NITRO_RELAY_ON: true
|
||||||
env_file:
|
env_file:
|
||||||
- ../config/go-nitro-auth/bootnode.env
|
- ../config/go-nitro-auth/bootnode.env
|
||||||
entrypoint: [ "bash", "-c", "/app/run-nitro-node.sh" ]
|
entrypoint: [ "bash", "-c", "/app/run-nitro-node.sh" ]
|
||||||
@ -89,6 +90,8 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 100
|
retries: 100
|
||||||
start_period: 100s
|
start_period: 100s
|
||||||
|
ports:
|
||||||
|
- "9090"
|
||||||
|
|
||||||
nitro-caddy:
|
nitro-caddy:
|
||||||
image: caddy:2-alpine
|
image: caddy:2-alpine
|
||||||
|
@ -77,6 +77,16 @@ if [[ "$CERC_NITRO_AUTH_ON" == "true" ]] && [[ -d "/app-node/packages/nitro-auth
|
|||||||
bash -c "sleep 6 && cd /app-node/packages/nitro-auth && yarn start" &
|
bash -c "sleep 6 && cd /app-node/packages/nitro-auth && yarn start" &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$CERC_NITRO_RELAY_ON" == "true" ]]; then
|
||||||
|
if [[ ! -f "/app/deployment/relay-node.json" ]]; then
|
||||||
|
node /usr/local/lib/node_modules/@cerc-io/peer/dist/cli/create-peer.js \
|
||||||
|
-f /app/deployment/relay-node.json
|
||||||
|
fi
|
||||||
|
DEBUG='laconic:*' node /usr/local/lib/node_modules/@cerc-io/peer/dist/cli/relay.js \
|
||||||
|
--host 0.0.0.0 \
|
||||||
|
-f /app/deployment/relay-node.json &
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z "$CERC_CHAIN_START_BLOCK" ]]; then
|
if [[ -z "$CERC_CHAIN_START_BLOCK" ]]; then
|
||||||
if [[ ! -f "/app/deployment/chainstartblock.json" ]]; then
|
if [[ ! -f "/app/deployment/chainstartblock.json" ]]; then
|
||||||
curl --location "$(echo $CERC_NITRO_CHAIN_URL | sed 's/^ws/http/' | sed 's#/ws/#/#')" \
|
curl --location "$(echo $CERC_NITRO_CHAIN_URL | sed 's/^ws/http/' | sed 's#/ws/#/#')" \
|
||||||
|
@ -30,6 +30,8 @@ RUN apt-get update
|
|||||||
RUN apt-get install -y ca-certificates jq netcat make curl wget
|
RUN apt-get install -y ca-certificates jq netcat make curl wget
|
||||||
RUN rm -rf /var/lib/apt/lists/*
|
RUN rm -rf /var/lib/apt/lists/*
|
||||||
RUN npm install -g http-server
|
RUN npm install -g http-server
|
||||||
|
RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
||||||
|
RUN npm install -g @cerc-io/peer
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=builder /app/nitro .
|
COPY --from=builder /app/nitro .
|
||||||
COPY --from=builder-node /app /app-node
|
COPY --from=builder-node /app /app-node
|
Loading…
Reference in New Issue
Block a user