Skip to content

Commit

Permalink
Update environment variables in Dockerfile and
Browse files Browse the repository at this point in the history
env.example
  • Loading branch information
Jennievon committed Aug 6, 2024
1 parent 2c5d2ed commit 75aaf89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
10 changes: 2 additions & 8 deletions contracts/src/bridge/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@ COPY ./contracts/src/bridge/frontend /home/obscuro/go-obscuro/contracts/src/brid
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
Expand Down
4 changes: 2 additions & 2 deletions contracts/src/bridge/frontend/env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
NEXT_PUBLIC_BRIDGE_ENVIRONMENT=sepolia|uat|dev
NEXT_PUBLIC_BRIDGE_API_HOST_ENVIRONMENT=sepolia|uat|dev

NEXT_PUBLIC_PRIVATE_KEY=
NEXT_PUBLIC_BRIDGE_PRIVATE_KEY=

NEXT_PUBLIC_BRIDGE_GOOGLE_ANALYTICS_ID=

Expand Down
4 changes: 3 additions & 1 deletion contracts/src/bridge/frontend/src/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const environment = process.env.NEXT_PUBLIC_BRIDGE_ENVIRONMENT;
export const environment = process.env.NEXT_PUBLIC_BRIDGE_API_HOST_ENVIRONMENT;

export const apiHost = `https://${environment}-testnet-api.tenscan.io`;

Expand Down Expand Up @@ -39,6 +39,8 @@ export const getOptions = (query: {
export const GOOGLE_ANALYTICS_ID =
process.env.NEXT_PUBLIC_BRIDGE_GOOGLE_ANALYTICS_ID;

export const privateKey = process.env.NEXT_PUBLIC_BRIDGE_PRIVATE_KEY;

export const L1CHAINS = [
{
name: "Ethereum",
Expand Down

0 comments on commit 75aaf89

Please sign in to comment.