mirror of
https://github.com/the-draupnir-project/Draupnir.git
synced 2026-05-25 18:04:01 +00:00
82fe093ef3
https://github.com/the-draupnir-project/planning/issues/104 I don't know what the fuck they are doing with the typings in the vector bot-sdk repository but whatever. https://github.com/the-draupnir-project/Draupnir/issues/1053
31 lines
967 B
Docker
31 lines
967 B
Docker
# Copyright 2024 Gnuxie <Gnuxie@protonmail.com>
|
|
# Copyright 2019 The Matrix.org Foundation C.I.C.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0 AND AFL-3.0
|
|
|
|
FROM node:24-slim as build-stage
|
|
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
|
COPY . /tmp/src
|
|
# describe the version.
|
|
RUN cd /tmp/src && git describe > version.txt.tmp && mv version.txt.tmp version.txt
|
|
# build and install
|
|
RUN cd /tmp/src \
|
|
&& npm ci \
|
|
&& npm run build \
|
|
&& npm prune --production
|
|
|
|
FROM node:24-slim as final-stage
|
|
COPY --from=build-stage /tmp/src/apps/draupnir /apps/draupnir
|
|
COPY --from=build-stage /tmp/src/packages /packages
|
|
COPY --from=build-stage /tmp/src/node_modules /node_modules
|
|
COPY --from=build-stage /tmp/src/draupnir-entrypoint.sh /
|
|
|
|
ENV NODE_ENV=production
|
|
ENV NODE_CONFIG_DIR=/data/config
|
|
# Set SQLite's temporary directory. See #746 for context.
|
|
ENV SQLITE_TMPDIR=/data
|
|
|
|
CMD ["bot"]
|
|
ENTRYPOINT ["./draupnir-entrypoint.sh"]
|
|
VOLUME ["/data"]
|