forked from maildev/maildev
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (27 loc) · 748 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Base
FROM node:18-alpine as base
ENV NODE_ENV production
# Build
FROM base as build
WORKDIR /root
COPY . .
RUN npm install typescript -g \
&& npm install sass -g \
&& npm install \
&& npm prune \
&& npm cache clean --force \
&& npm run build
# Prod
FROM base as prod
USER node
WORKDIR /home/node
COPY --chown=node:node . /home/node
COPY --chown=node:node --from=build /root/node_modules /home/node/node_modules
COPY --chown=node:node --from=build /root/dist ./dist
COPY --chown=node:node bin ./bin
EXPOSE 1080 1025
ENV MAILDEV_WEB_PORT 1080
ENV MAILDEV_SMTP_PORT 1025
ENTRYPOINT ["bin/maildev"]
HEALTHCHECK --interval=10s --timeout=1s \
CMD wget -O - http://localhost:${MAILDEV_WEB_PORT}${MAILDEV_BASE_PATHNAME}/healthz || exit 1