From 490f960fcfd33eec0462bcdc866e2200ff4bd817 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Sat, 10 Feb 2024 23:02:19 +0100 Subject: [PATCH] Fixed. --- .github/workflows/windows.yml | 8 ++++---- Dockerfile | 6 +++--- src/bin/buildForWindows.sh | 1 - 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 50faf2369..cdeec5200 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -142,15 +142,15 @@ jobs: - name: Only install direct dependencies run: pnpm config set auto-install-peers false - name: Install all dependencies and symlink for ep_etherpad-lite - run: src/bin/installDeps.sh - working-directory: etherpad + run: ./bin/installDeps.sh + working-directory: etherpad/src - name: Run Etherpad working-directory: etherpad/src run: | - pnpm run prod --prefix ./src + pnpm run prod curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test - .\node_modules\.bin\cypress run --config-file src\tests\frontendcypress\cypress.config.js + pnpm exec cypress run --config-file ../tests/frontend/cypress/cypress.config.js # On release, upload windows zip to GitHub release tab - name: Rename to etherpad-lite-win.zip diff --git a/Dockerfile b/Dockerfile index a1f149ad7..ff6417001 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,6 +83,7 @@ RUN \ apk update && apk upgrade && \ apk add \ ca-certificates \ + curl \ git \ ${INSTALL_ABIWORD:+abiword abiword-plugin-command} \ ${INSTALL_SOFFICE:+libreoffice openjdk8-jre libreoffice-common} @@ -113,13 +114,12 @@ COPY --chown=etherpad:etherpad ${SETTINGS} "${EP_DIR}"/settings.json #RUN chmod -R g=u . USER root -RUN cd src && npm link USER etherpad WORKDIR /opt/etherpad-lite -HEALTHCHECK --interval=20s --timeout=3s CMD ["pnpm", "etherpad-healthcheck"] - +HEALTHCHECK --interval=5s --timeout=3s \ + CMD curl --silent http://localhost:9001/health | grep -E "pass|ok|up" > /dev/null || exit 1 EXPOSE 9001 CMD ["npm", "run", "prod", "--prefix", "./src"] diff --git a/src/bin/buildForWindows.sh b/src/bin/buildForWindows.sh index f878ff46a..ee55f34d7 100755 --- a/src/bin/buildForWindows.sh +++ b/src/bin/buildForWindows.sh @@ -34,7 +34,6 @@ try export GIT_WORK_TREE=${TMP_FOLDER}; git checkout HEAD -f \ try mkdir "${TMP_FOLDER}"/.git try git rev-parse HEAD >${TMP_FOLDER}/.git/HEAD # Disable symlinks to avoid problems with Windows -try pnpm config set symlink false try pnpm i "${TMP_FOLDER}"/src/node_modules try cd "${TMP_FOLDER}"