Skip to content

Commit 0b2ecfe

Browse files
committed
feat: add root-level Dockerfile for web-wallet deployment
1 parent 1bd6859 commit 0b2ecfe

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

Dockerfile.web-wallet

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Build stage
2+
FROM node:20-alpine AS builder
3+
4+
WORKDIR /app
5+
6+
# Copy yarn configuration and patches
7+
COPY .yarnrc.yml ./
8+
COPY .yarn ./.yarn
9+
COPY package.json yarn.lock ./
10+
COPY packages/web-wallet/package.json ./packages/web-wallet/
11+
COPY packages/snap-utils/package.json ./packages/snap-utils/
12+
COPY packages/hathor-rpc-handler/package.json ./packages/hathor-rpc-handler/
13+
14+
# Install dependencies
15+
RUN corepack enable && yarn install
16+
17+
# Copy source code
18+
COPY packages/web-wallet ./packages/web-wallet
19+
COPY packages/snap-utils ./packages/snap-utils
20+
21+
# Build the application
22+
WORKDIR /app/packages/web-wallet
23+
RUN yarn build
24+
25+
# Production stage
26+
FROM nginx:alpine
27+
28+
# Copy built files to nginx
29+
COPY --from=builder /app/packages/web-wallet/dist /usr/share/nginx/html
30+
31+
# Copy nginx configuration
32+
COPY packages/web-wallet/nginx.conf /etc/nginx/conf.d/default.conf
33+
34+
EXPOSE 80
35+
36+
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)