Skip to content

Commit

Permalink
Update environment variables in
Browse files Browse the repository at this point in the history
manual-deploy-ten-bridge.yml and Dockerfile
  • Loading branch information
Jennievon committed Aug 7, 2024
1 parent ed658f8 commit 3633047
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/manual-deploy-ten-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 4 additions & 14 deletions contracts/src/bridge/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
EXPOSE 80

0 comments on commit 3633047

Please sign in to comment.