Refactor project structure and introduce workspaces (#6170)

* prototype for structure change - working

* move server.ts

* Revert "move server.ts"

This reverts commit 4cf2e61dc0.

* adjusted package file

* further cleanup

* add workspace root flag

* fix docker install

* fix loadtest

* fix run
This commit is contained in:
JannikStreek 2024-02-19 22:31:27 +01:00 committed by GitHub
parent a8ff9d5667
commit b4ac96d823
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 48 additions and 13 deletions

View file

@ -88,15 +88,17 @@ COPY --chown=etherpad:etherpad ./.git/HEAD ./.git/HEAD
COPY --chown=etherpad:etherpad ./.git/refs ./.git/refs
COPY --chown=etherpad:etherpad ${SETTINGS} ./settings.json
COPY --chown=etherpad:etherpad ./var ./var
COPY --chown=etherpad:etherpad ./node_modules ./node_modules
COPY --chown=etherpad:etherpad ./package.json ./package.json
COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./pnpm-workspace.yaml
FROM build as development
COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/pnpm-lock.yaml ./src/
COPY --chown=etherpad:etherpad ./src/bin ./src/bin
RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \
pnpm install --no-save --legacy-peer-deps ${ETHERPAD_PLUGINS}; } && \
pnpm install --workspace-root ${ETHERPAD_PLUGINS}; } && \
src/bin/installDeps.sh
FROM build as production
@ -118,7 +120,7 @@ COPY --chown=etherpad:etherpad ./src ./src
# seems to confuse tools such as `npm outdated`, `npm update`, and some ESLint
# rules.
RUN { [ -z "${ETHERPAD_PLUGINS}" ] || \
pnpm install --no-save --legacy-peer-deps ${ETHERPAD_PLUGINS}; } && \
pnpm install --workspace-root ${ETHERPAD_PLUGINS}; } && \
src/bin/installDeps.sh && \
rm -rf ~/.npm