forked from NullDev/CSZ-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 919 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
32
33
34
35
36
FROM node:16-slim as build
WORKDIR /app
# Install dependencies (with dev-deps)
COPY package*.json /app/
RUN npm ci
COPY . /app/
RUN npm run compile
FROM node:16-slim as runtime-dependencies
WORKDIR /app
# Install dependencies (runtime-deps only)
COPY package*.json /app/
RUN NODE_ENV=production npm ci
FROM node:16-slim
WORKDIR /app
RUN apt update -yqq && \
apt install fonts-noto-color-emoji fontconfig fonts-liberation -yqq && \
apt clean && \
fc-cache -f -v
ENV NODE_ENV=production
EXPOSE 3000
ENV TZ 'Europe/Berlin'
RUN cp /usr/share/zoneinfo/${TZ} /etc/localtime
COPY --from=runtime-dependencies /app/node_modules /app/node_modules
COPY --from=build /app/package.json /app/package.json
COPY --from=build /app/assets /app/assets
COPY --from=build /app/built /app/built
CMD ["node", "built/app.js"]