|
|
@ -1,16 +1,26 @@ |
|
|
|
FROM node:12.14-stretch |
|
|
|
FROM node:12.14-stretch AS builder |
|
|
|
WORKDIR /opt/baphomet |
|
|
|
COPY . /opt/baphomet |
|
|
|
|
|
|
|
RUN cd /opt/baphomet \ |
|
|
|
&& npm install \ |
|
|
|
&& npm run build |
|
|
|
|
|
|
|
FROM node:12.14-stretch |
|
|
|
WORKDIR /opt/baphomet |
|
|
|
COPY . /opt/baphomet |
|
|
|
|
|
|
|
ENV NODE_ENV=production |
|
|
|
ENV LOG_LEVEL=warn |
|
|
|
|
|
|
|
RUN mkdir /opt/baphomet/log |
|
|
|
RUN rm -rf /opt/baphomet/src \ |
|
|
|
&& mkdir /opt/baphomet/log |
|
|
|
|
|
|
|
COPY --from=builder /opt/baphomet/dist /opt/baphomet/dist |
|
|
|
|
|
|
|
RUN cd /opt/baphomet \ |
|
|
|
&& npm install --only=prod \ |
|
|
|
&& chmod +x entrypoint.sh |
|
|
|
|
|
|
|
WORKDIR /opt/baphomet |
|
|
|
ENTRYPOINT [ "./entrypoint.sh" ] |
|
|
|
CMD [ "run" ] |