From 3633047ee3548084ca5e0e70762f57f159f19b0a Mon Sep 17 00:00:00 2001 From: Jennifer Echenim Date: Wed, 7 Aug 2024 12:37:23 +0400 Subject: [PATCH] Update environment variables in manual-deploy-ten-bridge.yml and Dockerfile --- .github/workflows/manual-deploy-ten-bridge.yml | 2 +- contracts/src/bridge/frontend/Dockerfile | 18 ++++-------------- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/manual-deploy-ten-bridge.yml b/.github/workflows/manual-deploy-ten-bridge.yml index 320adcfac5..a6ab57c4b2 100644 --- a/.github/workflows/manual-deploy-ten-bridge.yml +++ b/.github/workflows/manual-deploy-ten-bridge.yml @@ -58,7 +58,7 @@ jobs: name: ${{ github.event.inputs.testnet_type }}-fe-ten-bridge location: "uksouth" restart-policy: "Never" - environment-variables: NEXT_PUBLIC_BRIDGE_API_HOST=https://${{ github.event.inputs.testnet_type }}-api.tenscan.io NEXT_PUBLIC_FE_VERSION=${{ GITHUB.RUN_NUMBER }}-${{ GITHUB.SHA }} + environment-variables: NEXT_PUBLIC_BRIDGE_API_HOST_ENVIRONMENT=${{ github.event.inputs.testnet_type }} NEXT_PUBLIC_FE_VERSION=${{ GITHUB.RUN_NUMBER }}-${{ GITHUB.SHA }} command-line: npm run start-prod ports: "80" cpu: 2 diff --git a/contracts/src/bridge/frontend/Dockerfile b/contracts/src/bridge/frontend/Dockerfile index dfb1a115fd..1618f5b024 100644 --- a/contracts/src/bridge/frontend/Dockerfile +++ b/contracts/src/bridge/frontend/Dockerfile @@ -2,29 +2,19 @@ FROM node:22-alpine # setup container data structure -RUN mkdir -p /home/obscuro/go-obscuro/contracts/src/bridge/frontend +RUN mkdir -p /home/obscuro/go-obscuro/contracts/src/bridge COPY ./contracts/src/bridge/frontend /home/obscuro/go-obscuro/contracts/src/bridge/frontend WORKDIR /home/obscuro/go-obscuro/contracts/src/bridge/frontend # ARG for build-time variable -ARG API_HOST -ARG L1_BRIDGE -ARG L2_BRIDGE -ARG MESSAGE_BUS +ARG BRIDGE_ENVIRONMENT ARG GOOGLE_ANALYTICS_ID # ENV for URL to be used in the app -ENV NEXT_PUBLIC_BRIDGE_API_HOST=${API_HOST} -ENV NEXT_PUBLIC_BRIDGE_L1=${L1_BRIDGE} -ENV NEXT_PUBLIC_BRIDGE_L2=${L2_BRIDGE} -ENV NEXT_PUBLIC_BRIDGE_MESSAGE_BUS=${MESSAGE_BUS} +ENV NEXT_PUBLIC_BRIDGE_API_HOST_ENVIRONMENT=${BRIDGE_ENVIRONMENT} ENV NEXT_PUBLIC_BRIDGE_GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID} RUN npm install -RUN npm run build - -EXPOSE 80 - -CMD ["npm", "start"] \ No newline at end of file +EXPOSE 80 \ No newline at end of file