We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 900329e + 91452d7 commit 35631c9Copy full SHA for 35631c9
Dockerfile
@@ -1,12 +1,20 @@
1
-FROM node:14
+FROM node:14 AS BUILD_IMAGE
2
3
ENV VERSION=v3.6.1
4
5
+WORKDIR /usr/src/app
6
+
7
RUN git clone https://github.com/Dragory/modmailbot && \
8
cd modmailbot && \
9
git checkout ${VERSION} && \
- npm ci
10
+ npm install -g minify-all node-prune && \
11
+ npm ci --only=production && \
12
+ npm prune --production && \
13
+ node-prune && \
14
+ minify-all
15
16
17
+FROM node:14-alpine
18
ENV MM_MAIN_SERVER_ID=
19
ENV MM_INBOX_SERVER_ID=
20
ENV MM_LOG_CHANNEL_ID=
@@ -19,6 +27,8 @@ ENV MM_CATEGORY_AUTOMATION__NEW_THREAD=
27
ENV MM_STATUS="Modmail, the way to report things"
28
ENV MM_URL=
21
29
22
-WORKDIR modmailbot
30
+COPY --from=BUILD_IMAGE /usr/src/app/modmailbot /usr/src/modmailbot
31
32
+WORKDIR /usr/src/modmailbot
23
33
24
34
ENTRYPOINT ["npm", "start"]
0 commit comments