Upgrade to Node v10
This commit is contained in:
parent
1eba2f09a3
commit
e6f7100bad
18
Dockerfile
18
Dockerfile
|
@ -1,15 +1,17 @@
|
||||||
FROM node:8-alpine
|
FROM node:10 AS builder
|
||||||
|
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
|
||||||
|
COPY package*.json /app/
|
||||||
|
WORKDIR /app
|
||||||
|
RUN npm install --production
|
||||||
|
|
||||||
RUN apk add --no-cache git
|
FROM node:10-slim
|
||||||
RUN addgroup -S -g 10001 app && adduser -S -D -G app -u 10001 app
|
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
|
||||||
COPY . /app
|
|
||||||
RUN chown -R app /app
|
|
||||||
USER app
|
USER app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN mkdir static
|
COPY --chown=app:app --from=builder /app .
|
||||||
RUN npm install --production && npm cache clean --force
|
COPY --chown=app:app . .
|
||||||
|
|
||||||
ENV PORT=1443
|
ENV PORT=1443
|
||||||
EXPOSE $PORT
|
EXPOSE $PORT
|
||||||
|
|
||||||
CMD ["npm", "run", "prod"]
|
CMD ["node", "server/prod.js"]
|
||||||
|
|
|
@ -2,7 +2,7 @@ version: 2.0
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:8
|
- image: circleci/node:10
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
|
@ -19,7 +19,7 @@ jobs:
|
||||||
- ./dist
|
- ./dist
|
||||||
test:
|
test:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:8-browsers
|
- image: circleci/node:10-browsers
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
|
|
Loading…
Reference in New Issue