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 3 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
17 changes: 7 additions & 10 deletions contracts/src/bridge/frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Use an official Node.js 22 as a parent image
FROM node:22-alpine
FROM node:18-buster as runner
# setup container data structure
Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably better to use newest version if it works (like changing node:18-buster -> node:22-alpine). Shouldn't make a difference but might avoid some issues.

RUN mkdir -p /home/obscuro/go-obscuro/contracts/src/bridge
COPY ./contracts/src/bridge/frontend /home/obscuro/go-obscuro/contracts/src/bridge/frontend

WORKDIR /usr/src/app
WORKDIR /home/obscuro/go-obscuro/contracts/src/bridge/frontend

# ARG for build-time variable
ARG API_HOST
Expand All @@ -17,11 +19,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"]

EXPOSE 80
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

Loading