mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-04-25 20:19:12 +00:00
refresh dockerfile (it's smoller and faster now!)
This commit is contained in:
parent
e03f6810da
commit
47938dbb3a
1 changed files with 8 additions and 13 deletions
21
Dockerfile
21
Dockerfile
|
@ -1,18 +1,13 @@
|
||||||
FROM node:10 AS builder
|
FROM node:10 AS builder
|
||||||
# ENV NODE_ENV production
|
WORKDIR /src
|
||||||
COPY ./UI /src/UI
|
COPY . /src
|
||||||
RUN cd /src/UI && yarn && yarn build
|
# we double yarn here to strip off dev-only packages that are needed at build time.
|
||||||
|
RUN yarn --frozen-lockfile &&\
|
||||||
COPY ./Server /src/Server
|
yarn build &&\
|
||||||
RUN cd /src/Server && yarn
|
yarn --prod --frozen-lockfile
|
||||||
|
|
||||||
RUN cp -r /src/UI/build /src/Server/public
|
|
||||||
|
|
||||||
|
|
||||||
FROM mhart/alpine-node:10
|
FROM mhart/alpine-node:10
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
WORKDIR /dist
|
WORKDIR /dist
|
||||||
EXPOSE 6769
|
COPY --from=builder /src /dist
|
||||||
RUN npm i -g pm2
|
CMD node index.js
|
||||||
COPY --from=builder /src/Server /dist
|
|
||||||
CMD pm2-docker index.js
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue