Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
FROM node:14
FROM node:14 AS BUILD_IMAGE

ENV VERSION=v3.3.2

WORKDIR /usr/src/app

RUN git clone https://github.com/Dragory/modmailbot && \
cd modmailbot && \
git checkout ${VERSION} && \
npm ci
npm install -g minify-all node-prune && \
npm ci --only=production && \
npm prune --production && \
node-prune && \
minify-all


FROM node:14-alpine
ENV MM_MAIN_SERVER_ID=
ENV MM_INBOX_SERVER_ID=
ENV MM_LOG_CHANNEL_ID=
Expand All @@ -19,6 +27,8 @@ ENV MM_CATEGORY_AUTOMATION__NEW_THREAD=
ENV MM_STATUS="Modmail, the way to report things"
ENV MM_URL=

WORKDIR modmailbot
COPY --from=BUILD_IMAGE /usr/src/app/modmailbot /usr/src/modmailbot

WORKDIR /usr/src/modmailbot

ENTRYPOINT ["npm", "start"]