mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-11-27 06:59:54 +08:00
25 lines
510 B
Docker
25 lines
510 B
Docker
ARG BUILDPLATFORM=linux/amd64
|
|
FROM --platform=${BUILDPLATFORM} node:lts-alpine AS builder
|
|
|
|
WORKDIR /src
|
|
COPY . /src
|
|
|
|
RUN chmod a+x ./install-dependents.sh &&\
|
|
chmod a+x ./build.sh &&\
|
|
./install-dependents.sh &&\
|
|
./build.sh
|
|
|
|
FROM node:lts-alpine
|
|
|
|
WORKDIR /opt/mcsmanager/web
|
|
|
|
COPY --from=builder /src/production-code/web/ /opt/mcsmanager/web/
|
|
|
|
RUN npm install --production
|
|
|
|
EXPOSE 23333
|
|
|
|
VOLUME ["/opt/mcsmanager/web/data", "/opt/mcsmanager/web/logs"]
|
|
|
|
CMD [ "app.js", "--max-old-space-size=8192" ]
|