generated from hackforla/.github-hackforla-base-repo-template
-
-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 627 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 627 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
FROM node:lts-alpine AS clientbuilder
RUN mkdir /app
WORKDIR /app
COPY /client/package.json .
COPY /client/package-lock.json .
RUN npm ci --legacy-peer-deps
COPY /client .
ENV NODE_ENV="production"
RUN npm run build
RUN echo package.json
FROM node:lts-alpine
WORKDIR /
COPY --from=clientbuilder /app/dist /client/build
COPY ./server/package.json ./
COPY ./server/package-lock.json ./
#RUN npm ci && find node_modules ! -user root | xargs chown root:root
RUN npm ci
COPY ./server/app ./app
COPY ./server/middleware ./middleware
COPY ./server/server.js ./
EXPOSE 5001
ENTRYPOINT ["/usr/local/bin/node", "./server.js"]