mirror of
https://github.com/zadam/trilium.git
synced 2026-09-14 11:06:04 +05:00
29 lines
1.1 KiB
Docker
29 lines
1.1 KiB
Docker
# Since better-sqlite3 v13 the addon is N-API based and ships prebuilt binaries
|
|
# for every supported platform/arch inside the package itself, which the server
|
|
# build copies into ./dist. There is therefore no native compile step and no
|
|
# builder stage any more. The Linux prebuilds need glibc >= 2.34 (x64) and
|
|
# >= 2.38 (arm64), so the base image is trixie rather than bookworm (glibc 2.36).
|
|
# Platforms without a prebuild (32-bit ARM) are served by Dockerfile.legacy,
|
|
# which still compiles from source.
|
|
FROM node:24.21.0-trixie-slim
|
|
|
|
# Install only runtime dependencies
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
gosu curl && \
|
|
rm -rf \
|
|
/var/lib/apt/lists/* \
|
|
/var/cache/apt/*
|
|
|
|
WORKDIR /usr/src/app
|
|
COPY ./dist /usr/src/app
|
|
COPY ./start-docker.sh /usr/src/app
|
|
|
|
# The healthcheck reads the listening address the server records here.
|
|
ENV TRILIUM_DATA_DIR=/home/node/trilium-data
|
|
|
|
# Configure container
|
|
EXPOSE 8080
|
|
CMD [ "sh", "./start-docker.sh" ]
|
|
HEALTHCHECK --interval=60s --timeout=5s --start-period=30s CMD exec gosu node sh /usr/src/app/docker_healthcheck.sh
|