Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initiate bridge deployment #1965

Merged
merged 4 commits into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions contracts/src/bridge/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Use an official Node.js 22 as a parent image
FROM node:22-alpine

WORKDIR /usr/src/app
# setup container data structure
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
Expand All @@ -17,11 +21,6 @@ ENV NEXT_PUBLIC_BRIDGE_L2=${L2_BRIDGE}
ENV NEXT_PUBLIC_BRIDGE_MESSAGE_BUS=${MESSAGE_BUS}
ENV NEXT_PUBLIC_BRIDGE_GOOGLE_ANALYTICS_ID=${GOOGLE_ANALYTICS_ID}

# Copy package.json and package-lock.json (or yarn.lock) into the container
COPY package*.json ./

RUN npm install
COPY . .
RUN npm run build
EXPOSE 80
CMD ["npm", "start"]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if you still need CMD ["npm", "start"] here? Depends if that's getting called by whatever kicks off the server I guess, maybe you don't need it if you're copying how it works for some other app

EXPOSE 80
Loading