Skip to content

Commit 60df458

Browse files
committed
works with nginx csp nonce
Signed-off-by: thomas turner <thomastdt@gmail.com>
1 parent 3f96432 commit 60df458

File tree

6 files changed

+33641
-7908
lines changed

6 files changed

+33641
-7908
lines changed

Dockerfile

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1-
FROM node:lts
2-
WORKDIR /app
3-
COPY package*.json ./
4-
RUN npm install
1+
FROM node:12.20.1-alpine
2+
3+
WORKDIR /opt/web
4+
5+
RUN npm install pm2 -g
6+
7+
COPY package.json package-lock.json ./
8+
RUN npm install --production
59

610
ENV PATH="./node_modules/.bin:$PATH"
7-
ADD . ./
8-
RUN npm run-script build
11+
12+
COPY . ./
13+
14+
EXPOSE 5000
15+
16+
RUN npm run build
17+
918
WORKDIR ./backend
19+
1020
RUN npm install
11-
CMD NODE_ENV=production node app.js
21+
22+
CMD ["/bin/sh", "-c", "pm2-runtime 'NODE_ENV=production node app.js'"]

0 commit comments

Comments
 (0)