Added new command to setup etherpad. Fixed Dockerfile

This commit is contained in:
SamTV12345 2024-07-23 17:43:18 +02:00
parent a2ad4b1975
commit 550a29f3e6
4 changed files with 15 additions and 9 deletions

View file

@ -25,3 +25,5 @@ Dockerfile
settings.json
src/node_modules
admin/node_modules
ui/node_modules
node_modules

View file

@ -5,11 +5,11 @@
# Author: muxator
FROM node:alpine AS adminbuild
RUN npm install -g pnpm@9.0.4
WORKDIR /opt/etherpad-lite
COPY ./ ./
RUN cd ./admin && npm install -g pnpm@9.0.4 && pnpm install && pnpm run build --outDir ./dist
RUN cd ./ui && pnpm install && pnpm run build --outDir ./dist
COPY . .
RUN pnpm install
RUN pnpm run build:ui
FROM node:alpine AS build
@ -115,8 +115,8 @@ COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./package.json ./
FROM build AS development
COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/admin/dist ./src/templates/admin
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/ui/dist ./src/static/oidc
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/ templates/admin./src/templates/admin
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/static/oidc ./src/static/oidc
RUN bin/installDeps.sh && \
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \
@ -130,8 +130,8 @@ ENV NODE_ENV=production
ENV ETHERPAD_PRODUCTION=true
COPY --chown=etherpad:etherpad ./src ./src
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/admin/dist ./src/templates/admin
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/ui/dist ./src/static/oidc
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/ templates/admin./src/templates/admin
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/static/oidc ./src/static/oidc
RUN bin/installDeps.sh && rm -rf ~/.npm && rm -rf ~/.local && rm -rf ~/.cache && \
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \

View file

@ -29,7 +29,8 @@
"install-plugins": "pnpm --filter bin run plugins i",
"remove-plugins": "pnpm --filter bin run remove-plugins",
"list-plugins": "pnpm --filter bin run list-plugins",
"build:etherpad": "pnpm --filter admin run build-copy && pnpm --filter ui run build-copy"
"build:etherpad": "pnpm --filter admin run build-copy && pnpm --filter ui run build-copy",
"build:ui": "pnpm --filter ui run build-copy && pnpm --filter admin run build-copy"
},
"dependencies": {
"ep_etherpad-lite": "workspace:./src"

View file

@ -26,6 +26,9 @@ const compressCSS = async (content) => {
minify: true,
bundle: true,
loader:{
'.jpg': 'dataurl',
'.png': 'dataurl',
'.gif': 'dataurl',
'.ttf': 'dataurl',
'.otf': 'dataurl',
'.woff': 'dataurl',