forked from juspay/hyperswitch-control-center
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (20 loc) · 666 Bytes
/
Dockerfile
File metadata and controls
31 lines (20 loc) · 666 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM node:18 AS base
WORKDIR /usr/src/app
COPY . .
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN npm i
RUN npm run build:prod
# this needs to be removed and made a separate deployment for this
RUN npm run build:embeddedapp
FROM node:18-alpine
WORKDIR /usr/src/app
COPY --from=base /usr/src/app/dist /usr/src/app/dist
COPY --from=base /usr/src/app/package*.json ./
RUN apk add --no-cache bash
# Create non-root user and switch to it
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
# Give ownership of /usr/src/app to appuser
RUN chown -R appuser:appgroup /usr/src/app
USER appuser
EXPOSE 8080 9000
CMD [ "/bin/bash", "-c", "npm run serve" ]