From 68dd2dff353cc947c856d34f97e3b59386e03637 Mon Sep 17 00:00:00 2001 From: Richard Robert Reitz Date: Thu, 28 Aug 2025 15:16:43 +0200 Subject: [PATCH] Updated Dockerfile --- Dockerfile | 67 ++------------------------------ index.html | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 115 insertions(+), 64 deletions(-) create mode 100644 index.html diff --git a/Dockerfile b/Dockerfile index c6d3439..c98e24d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,66 +1,5 @@ -# SPDX-FileCopyrightText: 2023 XWiki CryptPad Team and contributors -# -# SPDX-License-Identifier: AGPL-3.0-or-later +FROM nginx -# Multistage build to reduce image size and increase security -FROM node:lts-slim AS build +RUN rm -rf /usr/share/nginx/html/* -# Create folder for CryptPad -RUN mkdir /cryptpad -WORKDIR /cryptpad - -# Copy CryptPad source code to the container -COPY . /cryptpad - -RUN sed -i "s@//httpAddress: 'localhost'@httpAddress: '0.0.0.0'@" /cryptpad/config/config.example.js -RUN sed -i "s@installMethod: 'unspecified'@installMethod: 'docker'@" /cryptpad/config/config.example.js - -# Install dependencies -RUN npm install --production \ - && npm run install:components - -# Create actual CryptPad image -FROM node:lts-slim -ENV DEBIAN_FRONTEND=noninteractive - -# Create user and group for CryptPad so it does not run as root -RUN groupadd cryptpad -g 4001 -RUN useradd cryptpad -u 4001 -g 4001 -d /cryptpad - -# Install curl for healthcheck -# Install git, rdfind and unzip for install-onlyoffice.sh -RUN apt-get update && apt-get install --no-install-recommends -y \ - curl ca-certificates git rdfind unzip && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Copy cryptpad with installed modules -COPY --from=build --chown=cryptpad /cryptpad /cryptpad -USER cryptpad - -# Copy docker-entrypoint.sh script -COPY --chown=cryptpad docker-entrypoint.sh /cryptpad/docker-entrypoint.sh - -# Set workdir to cryptpad -WORKDIR /cryptpad - -# Create directories -RUN mkdir blob block customize data datastore - -# Volumes for data persistence -VOLUME /cryptpad/blob -VOLUME /cryptpad/block -VOLUME /cryptpad/customize -VOLUME /cryptpad/data -VOLUME /cryptpad/datastore - -ENTRYPOINT ["/bin/bash", "/cryptpad/docker-entrypoint.sh"] - -# Healthcheck -HEALTHCHECK --interval=1m CMD curl -f http://localhost:3000/ || exit 1 - -# Ports -EXPOSE 3000 3003 - -# Run cryptpad on startup -CMD ["npm", "start"] +COPY --chmod=644 index.html /usr/share/nginx/html/ diff --git a/index.html b/index.html new file mode 100644 index 0000000..44a390f --- /dev/null +++ b/index.html @@ -0,0 +1,112 @@ + + + + + + EDP meets Edge Connect + + + + + +
+ + + +
+ + +

EDP meets Edge Connect

+
+ + +