-
Notifications
You must be signed in to change notification settings - Fork 72
/
Dockerfile
33 lines (22 loc) · 866 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
FROM node:18-bullseye-slim AS BUILD
# git is needed to install Half-Shot/slackdown
RUN apt update && apt install -y git
WORKDIR /build
COPY package.json yarn.lock tsconfig.json ./
RUN yarn --ignore-scripts --pure-lockfile --network-timeout 600000
COPY ./src /build/src/
COPY ./widget /build/widget/
RUN yarn build
FROM node:18-bullseye-slim
VOLUME /data/ /config/
WORKDIR /usr/src/app
COPY package.json yarn.lock /usr/src/app/
RUN apt update && apt install git -y && yarn --network-timeout 600000 --production --pure-lockfile && yarn cache clean
COPY ./config /usr/src/app/config
COPY ./templates /usr/src/app/templates
COPY --from=BUILD /build/lib /usr/src/app/lib
COPY --from=BUILD /build/public /usr/src/app/public
EXPOSE 9898
EXPOSE 5858
ENTRYPOINT [ "node", "lib/app.js", "-c", "/config/config.yaml" ]
CMD [ "-f", "/config/slack-registration.yaml" ]