From ee933de99f43c5c6071cde5d0e0880901d6565a2 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 00:40:56 +0200 Subject: [PATCH 01/58] ci(gitlab-ci): use wget instead of curl --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f101eb7fc..ea232424b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -86,7 +86,8 @@ setup:containers:frontend: &setup-container - IMAGE_TAG=${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} - REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} script: - - curl --request GET --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" > .gitlab-ci/.container-registry-contents.json + - wget --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" -o wget.log -O .gitlab-ci/.container-registry-contents.json + - cat wget.log - IMAGE_EXISTS=`grep \""${REGISTRY_DESTINATION}"\" .gitlab-ci/.container-registry-contents.json` - cat .gitlab-ci/.container-registry-contents.json - test "${CI_JOB_MANUAL}" = true && echo "Force rebuilding container." From 4240eb9ad213fa5107a4c63b314d751bbd96c707 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 00:43:06 +0200 Subject: [PATCH 02/58] ci(gitlab-ci): install wget --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ea232424b..eff140a57 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,6 +82,7 @@ setup:containers:frontend: &setup-container variables: IMAGE_TYPE: frontend before_script: &container-before + - apt-get -y update && apt-get -y install wget - IMAGE_VERSION=`cat ${IMAGE_TYPE}-image-version` - IMAGE_TAG=${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} - REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} From 770be6c00f3ea8e8024854be8b3131084e20de7a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 00:46:37 +0200 Subject: [PATCH 03/58] ci(gitlab-ci): use correct package manager for installing wget --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eff140a57..33c90a202 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,7 +82,7 @@ setup:containers:frontend: &setup-container variables: IMAGE_TYPE: frontend before_script: &container-before - - apt-get -y update && apt-get -y install wget + - yum install wget -y - IMAGE_VERSION=`cat ${IMAGE_TYPE}-image-version` - IMAGE_TAG=${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} - REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} From 2d1cd421c7e2a6c065a5ec1b7aea2593ca6a17b6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 00:49:17 +0200 Subject: [PATCH 04/58] ci(gitlab-ci): remove debug prints --- .gitlab-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 33c90a202..4ae729345 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -88,9 +88,7 @@ setup:containers:frontend: &setup-container - REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} script: - wget --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" -o wget.log -O .gitlab-ci/.container-registry-contents.json - - cat wget.log - IMAGE_EXISTS=`grep \""${REGISTRY_DESTINATION}"\" .gitlab-ci/.container-registry-contents.json` - - cat .gitlab-ci/.container-registry-contents.json - test "${CI_JOB_MANUAL}" = true && echo "Force rebuilding container." - > if [ -z "${IMAGE_EXISTS}" -o "${CI_JOB_MANUAL}" = true ] ; then From 56c26cdc0448b9932df62d126717a87a80e10d51 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 00:54:05 +0200 Subject: [PATCH 05/58] ci(frontend): fix frontend pipeline targets --- .gitlab-ci/frontend.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/frontend.yml b/.gitlab-ci/frontend.yml index b212a211c..da450d2a3 100644 --- a/.gitlab-ci/frontend.yml +++ b/.gitlab-ci/frontend.yml @@ -35,7 +35,7 @@ default: compile: stage: compile script: - - make -- frontend-build + - make -- compile-frontend IN_CI=true IN_CONTAINER=true artifacts: paths: - ${CI_PROJECT_DIR}/node_modules @@ -50,7 +50,7 @@ compile: lint: stage: lint script: - - make -- frontend-lint + - make -- lint-frontend IN_CI=true IN_CONTAINER=true cache: *frontend-cache test: @@ -58,5 +58,5 @@ test: needs: - compile script: - - make -- frontend-test + - make -- test-frontend IN_CI=true IN_CONTAINER=true cache: *frontend-cache From 4d0bcca246d7f3ca2781e7482ab47ace998cc875 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 00:55:50 +0200 Subject: [PATCH 06/58] ci(backend): fix backend pipeline targets --- .gitlab-ci/backend.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/backend.yml b/.gitlab-ci/backend.yml index a37752bf0..342f8a073 100644 --- a/.gitlab-ci/backend.yml +++ b/.gitlab-ci/backend.yml @@ -36,7 +36,7 @@ default: compile: stage: compile script: - - make -- backend-build${PROD_BUILD} + - make -- compile${PROD_BUILD}-backend IN_CI=true IN_CONTAINER=true artifacts: paths: - ${CI_PROJECT_DIR}/.stack-work/ @@ -46,7 +46,7 @@ compile: lint: stage: lint script: - - make -- backend-lint${PROD_BUILD} + - make -- lint${PROD_BUILD}-backend IN_CI=true IN_CONTAINER=true cache: *backend-cache test: @@ -54,7 +54,7 @@ test: needs: - compile script: - - make -- backend-test${PROD_BUILD} + - make -- test${PROD_BUILD}-backend IN_CI=true IN_CONTAINER=true cache: *backend-cache container: From e9cbb0771d245fa88ad0d5579f7e90228d1b94d7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 01:04:23 +0200 Subject: [PATCH 07/58] ci(gitlab-ci): fix IMAGE_EXISTS grep --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ae729345..038298597 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -88,7 +88,7 @@ setup:containers:frontend: &setup-container - REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} script: - wget --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" -o wget.log -O .gitlab-ci/.container-registry-contents.json - - IMAGE_EXISTS=`grep \""${REGISTRY_DESTINATION}"\" .gitlab-ci/.container-registry-contents.json` + - IMAGE_EXISTS=`grep \""${REGISTRY_DESTINATION}"\" .gitlab-ci/.container-registry-contents.json || :` - test "${CI_JOB_MANUAL}" = true && echo "Force rebuilding container." - > if [ -z "${IMAGE_EXISTS}" -o "${CI_JOB_MANUAL}" = true ] ; then From f8886e02a71b9fac67a513bd542069edb29f985d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 01:05:40 +0200 Subject: [PATCH 08/58] ci(gitlab-ci): move buildah yum install inside script --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 038298597..ce758717d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -82,11 +82,11 @@ setup:containers:frontend: &setup-container variables: IMAGE_TYPE: frontend before_script: &container-before - - yum install wget -y - IMAGE_VERSION=`cat ${IMAGE_TYPE}-image-version` - IMAGE_TAG=${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} - REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} script: + - yum install wget -y - wget --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" -o wget.log -O .gitlab-ci/.container-registry-contents.json - IMAGE_EXISTS=`grep \""${REGISTRY_DESTINATION}"\" .gitlab-ci/.container-registry-contents.json || :` - test "${CI_JOB_MANUAL}" = true && echo "Force rebuilding container." From 672bb8708c1fb078eae6dc01b91edbeef4e30ae2 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 01:11:55 +0200 Subject: [PATCH 09/58] ci(gitlab-ci): set correct build-args for container builds --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce758717d..5e3c11819 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -93,7 +93,7 @@ setup:containers:frontend: &setup-container - > if [ -z "${IMAGE_EXISTS}" -o "${CI_JOB_MANUAL}" = true ] ; then echo "Building image..." - buildah bud -t ${IMAGE_TAG} --build-arg PROJECT_DIR=${CI_PROJECT_DIR} --volume ${CI_PROJECT_DIR}:/tmp/${CI_PROJECT_DIR} --file docker/${IMAGE_TYPE}/Dockerfile + buildah bud -t ${IMAGE_TAG} --build-arg PROJECT_DIR=${CI_PROJECT_DIR} --build-arg MOUNT_DIR=/mnt/${CI_PROJECT_DIR} --volume ${CI_PROJECT_DIR}:/mnt/${CI_PROJECT_DIR} --file docker/${IMAGE_TYPE}/Dockerfile buildah push --creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" ${IMAGE_TAG} ${REGISTRY_DESTINATION} else echo "Image ${IMAGE_TAG} already exists in the container registry. Skipping build." From 76008624442a81bc6175b7b6e5f0f5d4eade3b31 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 11:23:28 +0200 Subject: [PATCH 10/58] ci(gitlab-ci): fix backend container rules --- .gitlab-ci/backend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/backend.yml b/.gitlab-ci/backend.yml index 342f8a073..55a498fb1 100644 --- a/.gitlab-ci/backend.yml +++ b/.gitlab-ci/backend.yml @@ -69,4 +69,4 @@ container: - buildah bud -t ${IMAGE_TAG} --volume ${CI_PROJECT_DIR}/bin/:/tmp/uniworx-bin --file docker/fradrive/Dockerfile - buildah push --creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" ${IMAGE_TAG} ${CI_REGISTRY_IMAGE}/${IMAGE_TAG} rules: - - if: ${PROD_BUILD} == -prod \ No newline at end of file + - if: ${PROD_BUILD} =~ -prod \ No newline at end of file From 4513634a0c1efa36fa2993f1a8a9786c969f53de Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 11:30:12 +0200 Subject: [PATCH 11/58] ci(gitlab-ci): use curl instead of wget again; more output for wait --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5e3c11819..450c018c6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -86,8 +86,7 @@ setup:containers:frontend: &setup-container - IMAGE_TAG=${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} - REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} script: - - yum install wget -y - - wget --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" -o wget.log -O .gitlab-ci/.container-registry-contents.json + - curl --request GET --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" > .gitlab-ci/.container-registry-contents.json - IMAGE_EXISTS=`grep \""${REGISTRY_DESTINATION}"\" .gitlab-ci/.container-registry-contents.json || :` - test "${CI_JOB_MANUAL}" = true && echo "Force rebuilding container." - > @@ -114,6 +113,7 @@ setup:containers:frontend:wait: &setup-container-wait echo "Waiting for container ${IMAGE_TAG} to appear in the container registry..." sleep 5 done + - echo "Image ${IMAGE_TAG} has been found in the container registry. Proceeding with the pipeline." rules: - if: $CI_MERGE_REQUEST_ID when: always From 774260fa3a12d9de8e4ed1b057a447cfabb38a1c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 11:31:48 +0200 Subject: [PATCH 12/58] ci(gitlab-ci): prohibit the container waiters (for MRs) to wait longer than 3h --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 450c018c6..d88ff586f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -118,6 +118,9 @@ setup:containers:frontend:wait: &setup-container-wait - if: $CI_MERGE_REQUEST_ID when: always - when: never + retry: 0 + interruptible: true + timeout: 3h setup:containers:backend: <<: *setup-container From 48b13c08a62f0f12262e045eafa4655f36786fd7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 11:33:57 +0200 Subject: [PATCH 13/58] ci(gitlab-ci): fix backend container prod rules --- .gitlab-ci/backend.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/backend.yml b/.gitlab-ci/backend.yml index 55a498fb1..a59585cdb 100644 --- a/.gitlab-ci/backend.yml +++ b/.gitlab-ci/backend.yml @@ -69,4 +69,5 @@ container: - buildah bud -t ${IMAGE_TAG} --volume ${CI_PROJECT_DIR}/bin/:/tmp/uniworx-bin --file docker/fradrive/Dockerfile - buildah push --creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" ${IMAGE_TAG} ${CI_REGISTRY_IMAGE}/${IMAGE_TAG} rules: - - if: ${PROD_BUILD} =~ -prod \ No newline at end of file + - if: ${PROD_BUILD} =~ /^-prod$/ + when: always \ No newline at end of file From a6873fefddeefd5e795aada74ae59bda929c2eca Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 11:36:43 +0200 Subject: [PATCH 14/58] ci(gitlab-ci): add missing frontend wait container var --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d88ff586f..66eeaef05 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -106,6 +106,8 @@ setup:containers:frontend:wait: &setup-container-wait needs: - setup:dynamic before_script: *container-before + variables: + IMAGE_TYPE: frontend script: - apt-get -y update && apt-get -y install curl - > From 6005680b382f98642b075877e2cd219c248f2ed1 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 11:40:46 +0200 Subject: [PATCH 15/58] ci(gitlab-ci): add more debug output for container builds --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 66eeaef05..d075fd170 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -87,11 +87,13 @@ setup:containers:frontend: &setup-container - REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} script: - curl --request GET --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" > .gitlab-ci/.container-registry-contents.json + - cat .gitlab-ci/.container-registry-contents.json - IMAGE_EXISTS=`grep \""${REGISTRY_DESTINATION}"\" .gitlab-ci/.container-registry-contents.json || :` + - echo "${IMAGE_EXISTS}" - test "${CI_JOB_MANUAL}" = true && echo "Force rebuilding container." - > if [ -z "${IMAGE_EXISTS}" -o "${CI_JOB_MANUAL}" = true ] ; then - echo "Building image..." + echo "Building image ${REGISTRY_DESTINATION}..." buildah bud -t ${IMAGE_TAG} --build-arg PROJECT_DIR=${CI_PROJECT_DIR} --build-arg MOUNT_DIR=/mnt/${CI_PROJECT_DIR} --volume ${CI_PROJECT_DIR}:/mnt/${CI_PROJECT_DIR} --file docker/${IMAGE_TYPE}/Dockerfile buildah push --creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" ${IMAGE_TAG} ${REGISTRY_DESTINATION} else From fa4b77b0ee56bb0f32502112d339fc5906825390 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 11:44:05 +0200 Subject: [PATCH 16/58] ci(gitlab-ci): GIT_STRATEGY = none for wait container jobs --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d075fd170..a7e3e591b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -109,6 +109,7 @@ setup:containers:frontend:wait: &setup-container-wait - setup:dynamic before_script: *container-before variables: + GIT_STRATEGY: none IMAGE_TYPE: frontend script: - apt-get -y update && apt-get -y install curl @@ -133,6 +134,7 @@ setup:containers:backend: setup:containers:backend:wait: <<: *setup-container-wait variables: + GIT_STRATEGY: none IMAGE_TYPE: backend From ce86bbf47a56877af442c8a968974f5ee5cf00f0 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 11:49:47 +0200 Subject: [PATCH 17/58] build(docker/frontend): fix if-then-else syntax --- docker/frontend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 96bd9a7c9..2f05572ae 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -19,7 +19,7 @@ RUN n 20.17.0 ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive RUN mkdir -p ${PROJECT_DIR} -RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}"]; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi +RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi WORKDIR ${PROJECT_DIR} ENV HOME=${PROJECT_DIR} From 45d0e796496b77aef02e491e8946530f7ef3ded4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 12 Sep 2024 15:59:25 +0200 Subject: [PATCH 18/58] ci(gitlab-ci): fix backend container rules syntax --- .gitlab-ci/backend.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/backend.yml b/.gitlab-ci/backend.yml index a59585cdb..b8c7b8fbc 100644 --- a/.gitlab-ci/backend.yml +++ b/.gitlab-ci/backend.yml @@ -69,5 +69,5 @@ container: - buildah bud -t ${IMAGE_TAG} --volume ${CI_PROJECT_DIR}/bin/:/tmp/uniworx-bin --file docker/fradrive/Dockerfile - buildah push --creds "${CI_REGISTRY_USER}:${CI_JOB_TOKEN}" ${IMAGE_TAG} ${CI_REGISTRY_IMAGE}/${IMAGE_TAG} rules: - - if: ${PROD_BUILD} =~ /^-prod$/ + - if: '"${PROD_BUILD}" == "-prod"' when: always \ No newline at end of file From 973e7657b4d3df7dd26bdc63f30e57092172450a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 13 Sep 2024 17:40:28 +0200 Subject: [PATCH 19/58] ci(gitlab-ci): add debug output for dynamic setup --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7e3e591b..93e3a29ff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,13 @@ setup:dynamic: script: - FRONTEND_IMAGE_VERSION=`git log ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines | tee frontend-image-version` - BACKEND_IMAGE_VERSION=`git log ${BACKEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines | tee backend-image-version` + - git log ${FRONTEND_IMAGE_DEPENDENCIES} + - git log ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' + - git log ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines + - git log ${BACKEND_IMAGE_DEPENDENCIES} + - git log ${BACKEND_IMAGE_DEPENDENCIES} | grep '^commit' + - git log ${BACKEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines + - 'echo "FRONTEND_IMAGE_VERSION: ${FRONTEND_IMAGE_VERSION}, BACKEND_IMAGE_VERSION: ${BACKEND_IMAGE_VERSION}"' - cat .gitlab-ci/frontend.yml | .gitlab-ci/dynamci.pl FRONTEND_IMAGE_VERSION=${FRONTEND_IMAGE_VERSION} > frontend.yml - cat .gitlab-ci/backend.yml | .gitlab-ci/dynamci.pl BACKEND_IMAGE_VERSION=${BACKEND_IMAGE_VERSION} > backend.yml artifacts: From 8aec2676d069ff8457f417e8675045d716f9acdd Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 13 Sep 2024 17:42:55 +0200 Subject: [PATCH 20/58] ci(gitlab-ci): add more debug output --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93e3a29ff..4d8af70bb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,6 +63,7 @@ setup:dynamic: script: - FRONTEND_IMAGE_VERSION=`git log ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines | tee frontend-image-version` - BACKEND_IMAGE_VERSION=`git log ${BACKEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines | tee backend-image-version` + - git log - git log ${FRONTEND_IMAGE_DEPENDENCIES} - git log ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' - git log ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines From 746e8a4d16615257c0729db41651b69227be2293 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 13 Sep 2024 17:47:26 +0200 Subject: [PATCH 21/58] ci(gitlab-ci): git-log --all commits for frontend and backend dependencies for image version --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4d8af70bb..5cc5fb971 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,8 +61,8 @@ setup:dynamic: - apt-get -y update - apt-get -y install git script: - - FRONTEND_IMAGE_VERSION=`git log ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines | tee frontend-image-version` - - BACKEND_IMAGE_VERSION=`git log ${BACKEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines | tee backend-image-version` + - FRONTEND_IMAGE_VERSION=`git log --all ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines | tee frontend-image-version` + - BACKEND_IMAGE_VERSION=`git log --all ${BACKEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines | tee backend-image-version` - git log - git log ${FRONTEND_IMAGE_DEPENDENCIES} - git log ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' From e77b159c02b812fd00b8fdcc828c93890382bc58 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 13 Sep 2024 18:20:30 +0200 Subject: [PATCH 22/58] ci(gitlab-ci): use last modified iso-date instead of commit count for frontend/backend image versioning --- .gitlab-ci.yml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5cc5fb971..4552fba55 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,16 +60,11 @@ setup:dynamic: before_script: - apt-get -y update - apt-get -y install git + variables: + GIT_LOG_COMMAND: git log --max-count=1 --pretty=format:%cI script: - - FRONTEND_IMAGE_VERSION=`git log --all ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines | tee frontend-image-version` - - BACKEND_IMAGE_VERSION=`git log --all ${BACKEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines | tee backend-image-version` - - git log - - git log ${FRONTEND_IMAGE_DEPENDENCIES} - - git log ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' - - git log ${FRONTEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines - - git log ${BACKEND_IMAGE_DEPENDENCIES} - - git log ${BACKEND_IMAGE_DEPENDENCIES} | grep '^commit' - - git log ${BACKEND_IMAGE_DEPENDENCIES} | grep '^commit' | wc --lines + - FRONTEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${FRONTEND_IMAGE_DEPENDENCIES} | tee frontend-image-version` + - BACKEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${BACKEND_IMAGE_DEPENDENCIES} | tee backend-image-version` - 'echo "FRONTEND_IMAGE_VERSION: ${FRONTEND_IMAGE_VERSION}, BACKEND_IMAGE_VERSION: ${BACKEND_IMAGE_VERSION}"' - cat .gitlab-ci/frontend.yml | .gitlab-ci/dynamci.pl FRONTEND_IMAGE_VERSION=${FRONTEND_IMAGE_VERSION} > frontend.yml - cat .gitlab-ci/backend.yml | .gitlab-ci/dynamci.pl BACKEND_IMAGE_VERSION=${BACKEND_IMAGE_VERSION} > backend.yml From b928af40e63725e737b0c639170643dcf97390b9 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 13 Sep 2024 18:23:40 +0200 Subject: [PATCH 23/58] ci(gitlab-ci): switch to branch-first, image-type second for container registry destination --- .gitlab-ci.yml | 4 ++-- .gitlab-ci/backend.yml | 2 +- .gitlab-ci/frontend.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4552fba55..3794b9482 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -86,8 +86,8 @@ setup:containers:frontend: &setup-container IMAGE_TYPE: frontend before_script: &container-before - IMAGE_VERSION=`cat ${IMAGE_TYPE}-image-version` - - IMAGE_TAG=${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} - - REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${IMAGE_TYPE}/${CI_COMMIT_REF_SLUG}:${IMAGE_VERSION} + - IMAGE_TAG=${CI_COMMIT_REF_SLUG}/${IMAGE_TYPE}:${IMAGE_VERSION} + - REGISTRY_DESTINATION=${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}/${IMAGE_TYPE}:${IMAGE_VERSION} script: - curl --request GET --header "PRIVATE-TOKEN:${REGISTRY_AUTH_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/registry/repositories?tags=true" > .gitlab-ci/.container-registry-contents.json - cat .gitlab-ci/.container-registry-contents.json diff --git a/.gitlab-ci/backend.yml b/.gitlab-ci/backend.yml index b8c7b8fbc..e951ba3b6 100644 --- a/.gitlab-ci/backend.yml +++ b/.gitlab-ci/backend.yml @@ -22,7 +22,7 @@ stages: default: image: - name: ${CI_REGISTRY_IMAGE}/backend/${CI_COMMIT_REF_SLUG}:${BACKEND_IMAGE_VERSION} + name: ${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}/backend:${BACKEND_IMAGE_VERSION} entrypoint: [""] docker: platform: x86_64 diff --git a/.gitlab-ci/frontend.yml b/.gitlab-ci/frontend.yml index da450d2a3..ec9af20f8 100644 --- a/.gitlab-ci/frontend.yml +++ b/.gitlab-ci/frontend.yml @@ -21,7 +21,7 @@ stages: default: image: - name: ${CI_REGISTRY_IMAGE}/frontend/${CI_COMMIT_REF_SLUG}:${FRONTEND_IMAGE_VERSION} + name: ${CI_REGISTRY_IMAGE}/${CI_COMMIT_REF_SLUG}/frontend:${FRONTEND_IMAGE_VERSION} entrypoint: [""] docker: platform: x86_64 From 320f848aa9bf675ebd0dd512128b34bcd7792964 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 13 Sep 2024 18:42:07 +0200 Subject: [PATCH 24/58] ci(gitlab-ci): switch to custom (iso-like, but image tag friendly) date format for image versioning --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3794b9482..9d6c68047 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,7 +61,7 @@ setup:dynamic: - apt-get -y update - apt-get -y install git variables: - GIT_LOG_COMMAND: git log --max-count=1 --pretty=format:%cI + GIT_LOG_COMMAND: 'git log --max-count=1 --date=format:%Y-%m-%dT%H-%M --pretty=format:%cd' script: - FRONTEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${FRONTEND_IMAGE_DEPENDENCIES} | tee frontend-image-version` - BACKEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${BACKEND_IMAGE_DEPENDENCIES} | tee backend-image-version` From ef66ab15382b0a9663b5221fad39d9502d5a4e9d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 15 Sep 2024 01:59:08 +0200 Subject: [PATCH 25/58] build(Makefile): run containers interactively (-it) when serving --- Makefile | 17 +++++++++++++---- compose.yaml | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0d46d3812..beef22c3e 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ SHELL=bash export CONTAINER_COMMAND ?= podman +export CONTAINER_INTERACTIVE export IN_CONTAINER ?= false export IN_CI ?= false export WATCH @@ -42,6 +43,7 @@ release: ##### UNIFIED FRONTEND/BACKEND TARGETS ##### .PHONY: serve +serve: CONTAINER_INTERACTIVE=-it serve: $(MAKE) serve-database & $(MAKE) serve-frontend & @@ -74,9 +76,14 @@ test: test-frontend test-backend i18n-check --compile-frontend: --frontend-dependencies npx -- webpack --progress $(WATCH) -.PHONY: --serve-frontend ---serve-frontend: WATCH=--watch ---serve-frontend: --compile-frontend; +.PHONY: serve-frontend +serve-frontend: CONTAINER_INTERACTIVE=-it +serve-frontend: + $(MAKE) -- --containerized---compile-frontend WATCH=--watch + +# .PHONY: --serve-frontend +# --serve-frontend: WATCH=--watch +# --serve-frontend: --compile-frontend; .PHONY: --lint-frontend --lint-frontend: eslint.config.js @@ -135,6 +142,7 @@ well-known/.well-known: --%-prod-backend: --image-build --containerized-%-backend; .PHONY: serve-backend +serve-backend: CONTAINER_INTERACTIVE=-it serve-backend: DEV_PORT_HTTP=`docker/backend/dev_port.pl 3000 | tee .dev-port-http` \ DEV_PORT_HTTPS=`docker/backend/dev_port.pl 3443 | tee .dev-port-https` \ @@ -165,6 +173,7 @@ database: .stack .stack-work.lock compile-backend-prod stack exec uniworxdb -- $(db) .PHONY: serve-database +serve-database: CONTAINER_INTERACTIVE=-it serve-database: --containerized-database .PHONY: .stack @@ -225,7 +234,7 @@ image-rebuild-%: if [ "$(IN_CONTAINER)" == "true" ] ; then \ $(MAKE) -- $* ; \ else \ - $(CONTAINER_COMMAND) run -v $(PWD):$${MOUNT_DIR} --env IN_CONTAINER=true --env FRADRIVE_MAKE_TARGET=$* fradrive/$(FRADRIVE_SERVICE) ; \ + $(CONTAINER_COMMAND) run $(CONTAINER_INTERACTIVE) -v $(PWD):$${MOUNT_DIR} --env IN_CONTAINER=true --env FRADRIVE_MAKE_TARGET=$* fradrive/$(FRADRIVE_SERVICE) ; \ fi ##### CONTAINER TARGETS ##### diff --git a/compose.yaml b/compose.yaml index 5fa1e5191..4aca9a548 100644 --- a/compose.yaml +++ b/compose.yaml @@ -19,6 +19,7 @@ services: - *fradrive-mnt depends_on: - frontend + stdin_open: true database: # image: registry.uniworx.de/fradrive/fradrive/database # pull_policy: if_not_present From 5b5e33566ad359ecc1aafe4d9294426783041fa5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 15 Sep 2024 02:55:59 +0200 Subject: [PATCH 26/58] build(docker/backend): properly pulish exposed backend ports on serve --- Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index beef22c3e..e23c3fd50 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,7 @@ SHELL=bash export CONTAINER_COMMAND ?= podman export CONTAINER_INTERACTIVE +export CONTAINER_PORTS export IN_CONTAINER ?= false export IN_CI ?= false export WATCH @@ -144,13 +145,13 @@ well-known/.well-known: .PHONY: serve-backend serve-backend: CONTAINER_INTERACTIVE=-it serve-backend: - DEV_PORT_HTTP=`docker/backend/dev_port.pl 3000 | tee .dev-port-http` \ - DEV_PORT_HTTPS=`docker/backend/dev_port.pl 3443 | tee .dev-port-https` \ + DEV_PORT_HTTP=`docker/backend/dev_port.pl 3000 | tee .dev-port-http`; \ + DEV_PORT_HTTPS=`docker/backend/dev_port.pl 3443 | tee .dev-port-https`; \ $(MAKE) -- --containerized---serve-dev-backend DEV_PORT_HTTP=$${DEV_PORT_HTTP} DEV_PORT_HTTPS=$${DEV_PORT_HTTPS} .PHONY: --serve-dev-backend --serve-dev-backend: start.sh - DEV_PORT_HTTP=`cat .dev-port-http` \ - DEV_PORT_HTTPS=`cat .dev-port-https` \ + DEV_PORT_HTTP=`cat .dev-port-http`; \ + DEV_PORT_HTTPS=`cat .dev-port-https`; \ ./start.sh .PHONY: --compile-backend @@ -209,8 +210,9 @@ serve-database: --containerized-database .PHONY: --containerized-%-backend --containerized-%-backend: FRADRIVE_SERVICE=backend #--containerized-%-backend: --image-build --image-run-%-backend; +--containerized-%-backend: CONTAINER_PORTS=-p $(DEV_PORT_HTTP):3000 -p $(DEV_PORT_HTTPS):3443 --containerized-%-backend: --image-build - $(MAKE) -- --image-run-$*-backend + $(MAKE) -- --image-run-$*-backend .PHONY: image-rebuild image-rebuild-%: @@ -234,7 +236,7 @@ image-rebuild-%: if [ "$(IN_CONTAINER)" == "true" ] ; then \ $(MAKE) -- $* ; \ else \ - $(CONTAINER_COMMAND) run $(CONTAINER_INTERACTIVE) -v $(PWD):$${MOUNT_DIR} --env IN_CONTAINER=true --env FRADRIVE_MAKE_TARGET=$* fradrive/$(FRADRIVE_SERVICE) ; \ + $(CONTAINER_COMMAND) run $(CONTAINER_INTERACTIVE) -v $(PWD):$${MOUNT_DIR} $(CONTAINER_PORTS) --env IN_CONTAINER=true --env FRADRIVE_MAKE_TARGET=$* fradrive/$(FRADRIVE_SERVICE) ; \ fi ##### CONTAINER TARGETS ##### From 08f2b5e56a08713336b36cde2cb19d865bc0de73 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 15 Sep 2024 03:41:38 +0200 Subject: [PATCH 27/58] build(docker): publish database port for serve --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e23c3fd50..5a4ec4dd8 100644 --- a/Makefile +++ b/Makefile @@ -196,9 +196,10 @@ serve-database: --containerized-database .PHONY: --containerized-database --containerized-database: FRADRIVE_SERVICE=database +--containerized-database: CONTAINER_PORTS=-p 5432:5432 --containerized-database: --image-build if [ "$(IN_CONTAINER)" == "false" ] ; then \ - $(CONTAINER_COMMAND) run fradrive/$(FRADRIVE_SERVICE) ; \ + $(CONTAINER_COMMAND) run -it $(CONTAINER_PORTS) --name fradrive.$(FRADRIVE_SERVICE).$$(date +'%Y-%m-%dT%H-%M-%S') fradrive/$(FRADRIVE_SERVICE) ; \ fi .PHONY: --containerized-%-frontend @@ -236,7 +237,7 @@ image-rebuild-%: if [ "$(IN_CONTAINER)" == "true" ] ; then \ $(MAKE) -- $* ; \ else \ - $(CONTAINER_COMMAND) run $(CONTAINER_INTERACTIVE) -v $(PWD):$${MOUNT_DIR} $(CONTAINER_PORTS) --env IN_CONTAINER=true --env FRADRIVE_MAKE_TARGET=$* fradrive/$(FRADRIVE_SERVICE) ; \ + $(CONTAINER_COMMAND) run $(CONTAINER_INTERACTIVE) -v $(PWD):$${MOUNT_DIR} $(CONTAINER_PORTS) --env IN_CONTAINER=true --env FRADRIVE_MAKE_TARGET=$* --name fradrive.$(FRADRIVE_SERVICE).$$(date +'%Y-%m-%dT%H-%M-%S') fradrive/$(FRADRIVE_SERVICE) ; \ fi ##### CONTAINER TARGETS ##### From 59edebe1cf9c17364e9fef3a5607da36eaf03f92 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 15 Sep 2024 03:44:14 +0200 Subject: [PATCH 28/58] build(docker): use "host" as --network for docker runs --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5a4ec4dd8..282944364 100644 --- a/Makefile +++ b/Makefile @@ -196,7 +196,7 @@ serve-database: --containerized-database .PHONY: --containerized-database --containerized-database: FRADRIVE_SERVICE=database ---containerized-database: CONTAINER_PORTS=-p 5432:5432 +--containerized-database: CONTAINER_PORTS=-p 5432:5432 --network="host" --containerized-database: --image-build if [ "$(IN_CONTAINER)" == "false" ] ; then \ $(CONTAINER_COMMAND) run -it $(CONTAINER_PORTS) --name fradrive.$(FRADRIVE_SERVICE).$$(date +'%Y-%m-%dT%H-%M-%S') fradrive/$(FRADRIVE_SERVICE) ; \ @@ -211,7 +211,7 @@ serve-database: --containerized-database .PHONY: --containerized-%-backend --containerized-%-backend: FRADRIVE_SERVICE=backend #--containerized-%-backend: --image-build --image-run-%-backend; ---containerized-%-backend: CONTAINER_PORTS=-p $(DEV_PORT_HTTP):3000 -p $(DEV_PORT_HTTPS):3443 +--containerized-%-backend: CONTAINER_PORTS=-p $(DEV_PORT_HTTP):3000 -p $(DEV_PORT_HTTPS):3443 --network="host" --containerized-%-backend: --image-build $(MAKE) -- --image-run-$*-backend From 3833a97a0718c03b4aa57c0c80637c0788386abe Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 15 Sep 2024 03:50:09 +0200 Subject: [PATCH 29/58] build(docker/database): EXPOSE correct database port --- docker/database/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker/database/Dockerfile b/docker/database/Dockerfile index ab40f473f..c8445762a 100644 --- a/docker/database/Dockerfile +++ b/docker/database/Dockerfile @@ -15,5 +15,4 @@ USER postgres # ADD --chmod=755 ./initdb.sh /etc/fradrive-db ENTRYPOINT /etc/fradrive-db -EXPOSE $DEV_PORT_HTTP/tcp -EXPOSE $DEV_PORT_HTTPS/tcp \ No newline at end of file +EXPOSE 5432/tcp \ No newline at end of file From e059082cf6eeaec9c55f0e383e5ac094478c9b87 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 15 Sep 2024 15:01:14 +0200 Subject: [PATCH 30/58] ci(gitlab-ci): add config/webpack.yml to frontend artifacts --- .gitlab-ci/frontend.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci/frontend.yml b/.gitlab-ci/frontend.yml index ec9af20f8..16ed66c79 100644 --- a/.gitlab-ci/frontend.yml +++ b/.gitlab-ci/frontend.yml @@ -40,6 +40,7 @@ compile: paths: - ${CI_PROJECT_DIR}/node_modules - ${CI_PROJECT_DIR}/well-known + - ${CI_PROJECT_DIR}/config/webpack.yml cache: - &frontend-cache key: default-frontend From 120e00ea2e0e4a65829d0fe5541d76d0b337c0a4 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 16 Sep 2024 01:51:13 +0200 Subject: [PATCH 31/58] ci(gitlab-ci): pull frontend artifacts from backend downstream pipeline --- .gitlab-ci.yml | 2 +- .gitlab-ci/backend.yml | 4 +++ .gitlab-ci/pull-frontend-artifacts.pl | 52 +++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100755 .gitlab-ci/pull-frontend-artifacts.pl diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9d6c68047..c4bd76f1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,7 +67,7 @@ setup:dynamic: - BACKEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${BACKEND_IMAGE_DEPENDENCIES} | tee backend-image-version` - 'echo "FRONTEND_IMAGE_VERSION: ${FRONTEND_IMAGE_VERSION}, BACKEND_IMAGE_VERSION: ${BACKEND_IMAGE_VERSION}"' - cat .gitlab-ci/frontend.yml | .gitlab-ci/dynamci.pl FRONTEND_IMAGE_VERSION=${FRONTEND_IMAGE_VERSION} > frontend.yml - - cat .gitlab-ci/backend.yml | .gitlab-ci/dynamci.pl BACKEND_IMAGE_VERSION=${BACKEND_IMAGE_VERSION} > backend.yml + - cat .gitlab-ci/backend.yml | .gitlab-ci/dynamci.pl BACKEND_IMAGE_VERSION=${BACKEND_IMAGE_VERSION} PARENT_PIPELINE_ID=${CI_PIPELINE_ID} > backend.yml artifacts: paths: - frontend-image-version diff --git a/.gitlab-ci/backend.yml b/.gitlab-ci/backend.yml index e951ba3b6..beb349b68 100644 --- a/.gitlab-ci/backend.yml +++ b/.gitlab-ci/backend.yml @@ -13,6 +13,7 @@ variables: BACKEND_IMAGE_VERSION: #dyn# + PARENT_PIPELINE_ID: #dyn# stages: - compile @@ -26,6 +27,9 @@ default: entrypoint: [""] docker: platform: x86_64 + before_script: + - ./.gitlab-ci/pull-frontend-artifacts.pl "${REGISTRY_AUTH_TOKEN}" "${PARENT_PIPELINE_ID}" + - unzip ./.artifacts.tmp/artifacts.zip artifacts: name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}" expire_in: "1 day" diff --git a/.gitlab-ci/pull-frontend-artifacts.pl b/.gitlab-ci/pull-frontend-artifacts.pl new file mode 100755 index 000000000..8c6c9e457 --- /dev/null +++ b/.gitlab-ci/pull-frontend-artifacts.pl @@ -0,0 +1,52 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +my $dir = ".artifacts.tmp"; +my ($token, $id) = @ARGV; +die "usage: $0 [token] [id]" unless defined $token and defined $id; +die "id in bad format" unless $id=~m#^[0-9]+$#; + +if(!-d $dir) { + mkdir($dir) or die "Cannot create directory '$dir', because: $!\n"; +} + +system(qq(curl --globoff --header "PRIVATE-TOKEN: $token" "https://gitlab.uniworx.de/api/v4/projects/5/pipelines/$id/bridges" > $dir/bridges)); +my $pips = pparse("$dir/bridges", {id=>qq#."downstream_pipeline"."id"#}, {name=>""}); + +my $fe = $pips->{frontend}{id}; + +die "No frontend pipeline found!" unless $fe; + +system(qq(curl --globoff --header "PRIVATE-TOKEN: $token" "https://gitlab.uniworx.de/api/v4/projects/5/pipelines/$fe/jobs" > $dir/fe-jobs)); +my $arte = pparse("$dir/fe-jobs", {id=>""}, {name=>"", web_url=>"", artifacts=>""}); + +system(qq#curl --output $dir/artifacts.zip --location --header "PRIVATE-TOKEN: $token" "https://gitlab.uniworx.de/api/v4/projects/5/jobs/$arte->{compile}{id}/artifacts"#); + + +sub pparse { + my ($file, $numerical, $alpha) = @_; + my %all = (); + for my $k(keys %$numerical) { + $all{$k} = $numerical->{$k} || qq#."$k"#; + } + for my $k(keys %$alpha) { + $all{$k} = $alpha->{$k} || qq#."$k"#; + } + my $select = join ', ', map {qq#"$_": $all{$_}#} sort keys %all; + my $cont = qx(cat $file | jq -c '.[] | {$select}'); + my @cont = split m/\R/, $cont; + my %ret = (); + for my $c(@cont) { + my %block = (); + for(keys %$numerical) { + $block{$_} = $1 if $c=~m#"$_":([0-9]+)#; + } + for(keys %$alpha) { + $block{$_} = $1 if $c=~m#"$_":"([^"]*)"#; + } + $ret{$block{name}} =\%block; + } + return \%ret +} \ No newline at end of file From db515f0041f5daf63684f8c07a748407d380c6ba Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 16 Sep 2024 02:11:56 +0200 Subject: [PATCH 32/58] ci(gitlab-ci): do full pull for dynamic pre-setup job --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c4bd76f1e..378bf9dbb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,6 +61,7 @@ setup:dynamic: - apt-get -y update - apt-get -y install git variables: + GIT_STRATEGY: pull GIT_LOG_COMMAND: 'git log --max-count=1 --date=format:%Y-%m-%dT%H-%M --pretty=format:%cd' script: - FRONTEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${FRONTEND_IMAGE_DEPENDENCIES} | tee frontend-image-version` From c1e89b50461467f6deaaff81bd53d9718167b989 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 16 Sep 2024 02:12:52 +0200 Subject: [PATCH 33/58] ci(gitlab-ci): fix GIT_STRATEGY --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 378bf9dbb..9f62610e5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,7 +61,7 @@ setup:dynamic: - apt-get -y update - apt-get -y install git variables: - GIT_STRATEGY: pull + GIT_STRATEGY: clone GIT_LOG_COMMAND: 'git log --max-count=1 --date=format:%Y-%m-%dT%H-%M --pretty=format:%cd' script: - FRONTEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${FRONTEND_IMAGE_DEPENDENCIES} | tee frontend-image-version` From e28c695eb63909ac9ad3b65a37d0422e7d8f703a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 16 Sep 2024 02:15:43 +0200 Subject: [PATCH 34/58] ci(gitlab-ci): add debug print --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f62610e5..de9163055 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -64,6 +64,7 @@ setup:dynamic: GIT_STRATEGY: clone GIT_LOG_COMMAND: 'git log --max-count=1 --date=format:%Y-%m-%dT%H-%M --pretty=format:%cd' script: + - echo "${BACKEND_IMAGE_DEPENDENCIES}" - FRONTEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${FRONTEND_IMAGE_DEPENDENCIES} | tee frontend-image-version` - BACKEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${BACKEND_IMAGE_DEPENDENCIES} | tee backend-image-version` - 'echo "FRONTEND_IMAGE_VERSION: ${FRONTEND_IMAGE_VERSION}, BACKEND_IMAGE_VERSION: ${BACKEND_IMAGE_VERSION}"' From 6bc83f1418b1855ce07d13e82439f47ed804bd80 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 16 Sep 2024 02:21:31 +0200 Subject: [PATCH 35/58] ci(gitlab-ci): GIT_DEPTH per default considering only the last 10 commits, really... --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de9163055..c53b81cf1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,9 +61,11 @@ setup:dynamic: - apt-get -y update - apt-get -y install git variables: + GIT_DEPTH: 99999 GIT_STRATEGY: clone GIT_LOG_COMMAND: 'git log --max-count=1 --date=format:%Y-%m-%dT%H-%M --pretty=format:%cd' script: + - echo "${FRONTEND_IMAGE_DEPENDENCIES}" - echo "${BACKEND_IMAGE_DEPENDENCIES}" - FRONTEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${FRONTEND_IMAGE_DEPENDENCIES} | tee frontend-image-version` - BACKEND_IMAGE_VERSION=`${GIT_LOG_COMMAND} ${BACKEND_IMAGE_DEPENDENCIES} | tee backend-image-version` From d063f6827cc4771d54fb41baa7b194d3229e0afb Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 00:47:11 +0200 Subject: [PATCH 36/58] build(frontend): generate favicons based on svg using local tooling --- .gitignore | 1 + Makefile | 7 ++++- assets/apple-icon-180x180.png | Bin 10380 -> 0 bytes assets/apple-icon-180x180.png.license | 3 -- assets/favicon.ico | Bin 1150 -> 0 bytes assets/favicon.ico.license | 3 -- assets/favicon.svg.license | 3 -- utils/faviconize.pl | 42 ++++++++++++++++++++++++++ 8 files changed, 49 insertions(+), 10 deletions(-) delete mode 100644 assets/apple-icon-180x180.png delete mode 100644 assets/apple-icon-180x180.png.license delete mode 100644 assets/favicon.ico delete mode 100644 assets/favicon.ico.license delete mode 100644 assets/favicon.svg.license create mode 100755 utils/faviconize.pl diff --git a/.gitignore b/.gitignore index fb7530896..6db07f7bf 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ dist* node_modules/ assets/icons +assets/favicons bin/ *.hi *.o diff --git a/Makefile b/Makefile index 282944364..37cf6fbba 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ all: .PHONY: clean clean: - rm -rf node_modules .npm .cache assets/icons well-known static/ + rm -rf node_modules .npm .cache assets/icons assets/favicons well-known static/ rm -rf .stack .stack-work .stack-work-build .stack-work-run .stack-work-test .stack-work-doc rm -rf bin/ @@ -105,7 +105,11 @@ node_modules: package.json package-lock.json package-lock.json: package.json npm install --cache .npm --prefer-offline +# FIXME: refraining from targets below assets/ (e.g. assets/icons, assets/favicon) to avoid / in target name for now (and maybe to avoid target name pollution) assets: node_modules +# favicons + ./utils/faviconize.pl assets/favicon.svg long assets/favicons +# site icons ./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/solid utils/rename-fa.json assets/icons/fradrive ./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/regular utils/rename-fa.json assets/icons/fradrive assets/.assets: @@ -196,6 +200,7 @@ serve-database: --containerized-database .PHONY: --containerized-database --containerized-database: FRADRIVE_SERVICE=database +# port forwarding is disabled in --network=host mode; nevertheless it is stated here for documentation reasons --containerized-database: CONTAINER_PORTS=-p 5432:5432 --network="host" --containerized-database: --image-build if [ "$(IN_CONTAINER)" == "false" ] ; then \ diff --git a/assets/apple-icon-180x180.png b/assets/apple-icon-180x180.png deleted file mode 100644 index 7616ebd510bb21218fa88b6549daeb3ec4322ad8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10380 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 HGw}N#*`MiG diff --git a/assets/apple-icon-180x180.png.license b/assets/apple-icon-180x180.png.license deleted file mode 100644 index dfb358d6a..000000000 --- a/assets/apple-icon-180x180.png.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2022 Fraport AG - -SPDX-License-Identifier: LicenseRef-Fraport-Corporate-Design diff --git a/assets/favicon.ico b/assets/favicon.ico deleted file mode 100644 index 8d3db0787d1fe3cee902f0f9e490bd540835630e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmZQzU<5(|0R|wcz>vYhz#zuJz@P!dKp~(AL>x#lFaYI*xFHzK2NDw*82%47Jeh^% z|8!nnvfVXPNa+8TfB>-m83F?T=SoZCG;1ms*Z=AK{3!CvO-%lu?dbuFZSe5;zuwgq zMIJf4rf_ilUtwzce`ie0e~{WW_V)ju9Xs~_aB(qM&))QOI2&0Xj16+zN(+nsE6mLP z?}(26e|g4?|0kQ8{!ioP2J2sCZT``l0@qB_{U&NLktc135YWFHV{A|JwZdV08y_bN`=g zY{XCxa~Cce6t@Qp3jWWQkO12Ya}O@{*u+74X9x=ZpT@(3Hy*L+rL`EW93Ynl0AMD` AsQ>@~ diff --git a/assets/favicon.ico.license b/assets/favicon.ico.license deleted file mode 100644 index dfb358d6a..000000000 --- a/assets/favicon.ico.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2022 Fraport AG - -SPDX-License-Identifier: LicenseRef-Fraport-Corporate-Design diff --git a/assets/favicon.svg.license b/assets/favicon.svg.license deleted file mode 100644 index dfb358d6a..000000000 --- a/assets/favicon.svg.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2022 Fraport AG - -SPDX-License-Identifier: LicenseRef-Fraport-Corporate-Design diff --git a/utils/faviconize.pl b/utils/faviconize.pl new file mode 100755 index 000000000..8298a4cc5 --- /dev/null +++ b/utils/faviconize.pl @@ -0,0 +1,42 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +my ($file, $sizes, $faviconDir) = @ARGV; + +die "usage: $0 [origfile] [sizes] [faviconDir] (sizes is ,-seperated list of side length or short, medium or long\n" unless defined $file and defined $sizes and defined $faviconDir; + +die "File '$file' not found!\n" unless -e $file; + +$sizes = '16,32' if 'short' eq $sizes; +$sizes = '16,32,48,64,128,256' if 'medium' eq $sizes; +$sizes = '16,32,48,64,128,192,228,230,256,512' if 'long' eq $sizes; + +my @sizes = split m/,/, $sizes; + +my $include = ""; + +mkdir($faviconDir); +system("rm $faviconDir/*"); +for my $s(@sizes) { + resize($s, "favicon-${s}x$s.png"); +} + +resize(180, "apple-touch-icon.png"); + +sub resize { + my ($size, $newfile) = @_; + my $ret = system("convert '$file' -resize '${size}x$size' '$faviconDir/$newfile'"); + die "$0: convert exited with error code $ret on generating '$faviconDir/$newfile'\n" if $ret; + die "$0: output file '$faviconDir/$newfile' could not be generated\n" unless -e "$faviconDir/$newfile"; + my $icon = "icon"; + $icon = "apple-touch-icon" if $newfile=~m#apple#; + $include .= qq## +} + +my $wh = undef; +open($wh, '>', "$faviconDir/include.html") or die "Could not write '$faviconDir/include.html', because: $!"; +print $wh $include; + + From 916de8d0aeca366f8a92ff7fa4a59d8b6f398dd5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 00:52:54 +0200 Subject: [PATCH 37/58] build(frontend): fix faviconize dir removal --- utils/faviconize.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/faviconize.pl b/utils/faviconize.pl index 8298a4cc5..02d64829d 100755 --- a/utils/faviconize.pl +++ b/utils/faviconize.pl @@ -18,7 +18,11 @@ my @sizes = split m/,/, $sizes; my $include = ""; mkdir($faviconDir); -system("rm $faviconDir/*"); +my $dir = undef; +opendir($dir, $faviconDir) or die "Could not read directory '$faviconDir', because: $!\n"; +while(my $fn = readdir($dir)) { + unlink("$faviconDir/$fn") if -d "$faviconDir/$fn" +} for my $s(@sizes) { resize($s, "favicon-${s}x$s.png"); } From f0ef27635a11e48d9fbed26ee6d164ca519c8ec9 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 00:53:15 +0200 Subject: [PATCH 38/58] build(frontend): delete some unused favicon config --- assets/manifest.webmanifest | 41 ---------------- assets/manifest.webmanifest.license | 3 -- config/favicon.json | 76 ----------------------------- config/favicon.json.license | 3 -- 4 files changed, 123 deletions(-) delete mode 100644 assets/manifest.webmanifest delete mode 100644 assets/manifest.webmanifest.license delete mode 100644 config/favicon.json delete mode 100644 config/favicon.json.license diff --git a/assets/manifest.webmanifest b/assets/manifest.webmanifest deleted file mode 100644 index 013d4a6a5..000000000 --- a/assets/manifest.webmanifest +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "App", - "icons": [ - { - "src": "\/android-icon-36x36.png", - "sizes": "36x36", - "type": "image\/png", - "density": "0.75" - }, - { - "src": "\/android-icon-48x48.png", - "sizes": "48x48", - "type": "image\/png", - "density": "1.0" - }, - { - "src": "\/android-icon-72x72.png", - "sizes": "72x72", - "type": "image\/png", - "density": "1.5" - }, - { - "src": "\/android-icon-96x96.png", - "sizes": "96x96", - "type": "image\/png", - "density": "2.0" - }, - { - "src": "\/android-icon-144x144.png", - "sizes": "144x144", - "type": "image\/png", - "density": "3.0" - }, - { - "src": "\/android-icon-192x192.png", - "sizes": "192x192", - "type": "image\/png", - "density": "4.0" - } - ] -} \ No newline at end of file diff --git a/assets/manifest.webmanifest.license b/assets/manifest.webmanifest.license deleted file mode 100644 index e7b3ee229..000000000 --- a/assets/manifest.webmanifest.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2022 Steffen Jost - -SPDX-License-Identifier: AGPL-3.0-or-later diff --git a/config/favicon.json b/config/favicon.json deleted file mode 100644 index 029319487..000000000 --- a/config/favicon.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "masterPicture": "assets/favicon.svg", - "design": { - "desktop_browser": {}, - "ios": { - "picture_aspect": "background_and_margin", - "margin": "5%", - "background_color": "#ffffff", - "startup_image": { - "background_color": "#ffffff" - }, - "app_name": "FRADrive", - "assets": { - "ios6_and_prior_icons": false, - "ios7_and_later_icons": true, - "precomposed_icons": true, - "declare_only_default_icon": true - } - }, - "windows": { - "picture_aspect": "white_silhouette", - "background_color": "#0a9342", - "app_name": "FRADrive" - }, - "firefox_app": { - "picture_aspect": "circle", - "keep_picture_in_circle": false, - "circle_inner_margin": "5%", - "background_color": "#ffffff", - "overlay": false, - "manifest": { - "app_name": "FRADrive", - "app_description": { - "_i18n": true, - "de-de-formal": "Ein webbasiertes Schulungsverwaltungssystem", - "en-eu": "A web based training management system" - }, - "developer_name": "Uni2work-Team", - "developer_url": "https://uni2work.ifi.lmu.de/info", - "display": "browser", - "start_url": "/" - } - }, - "android_chrome": { - "picture_aspect": "shadow", - "manifest": { - "name": "FRADrive", - "display": "browser", - "orientation": "portrait", - "start_url": "/" - }, - "assets": { - "legacy_icon": true, - "low_resolution_icons": false - } - }, - "safari_pinned_tab": { - "picture_aspect": "silhouette", - "theme_color": "#0a9342" - }, - "coast": { - "picture_aspect": "background_and_margin", - "background_color": "#ffffff", - "margin": "10%" - }, - "open_graph": { - "picture_aspect": "background_and_margin", - "background_color": "#ffffff", - "margin": "10%", - "ratio": "square" - } - }, - "settings": { - "html_code_file": true - } -} diff --git a/config/favicon.json.license b/config/favicon.json.license deleted file mode 100644 index a0992def9..000000000 --- a/config/favicon.json.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2022 Gregor Kleen ,Steffen Jost - -SPDX-License-Identifier: AGPL-3.0-or-later From d151d0ca07a2b2c032e33b4b4e85abf59c2d13b7 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 00:59:33 +0200 Subject: [PATCH 39/58] build(docker/frontend): add imagemagick to frontend dependencies for favicon generation --- docker/frontend/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index 2f05572ae..b4c4d29d9 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -5,6 +5,7 @@ RUN apt-get -y update && apt-get -y install curl npm # Build and watch dependencies RUN apt-get -y update && apt-get -y install exiftool +RUN apt-get -y update && apt-get -y install imagemagick # Test dependencies RUN apt-get -y update && apt-get -y install chromium From fea82d2cc79618ee68c0e1bd9b0e9b54951e406a Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 01:01:41 +0200 Subject: [PATCH 40/58] chore: remove deprecated config and tests --- records.json | 13 ------------- test/Handler/CommonSpec.hs | 9 +++++---- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/records.json b/records.json index efeb5b9e7..59bd08227 100644 --- a/records.json +++ b/records.json @@ -1,17 +1,4 @@ { - "app-manifest-webpack-plugin for \"../../config/favicon.json\"": [ - { - "chunks": { - "byName": {}, - "bySource": {}, - "usedIds": [] - }, - "modules": { - "byIdentifier": {}, - "usedIds": {} - } - } - ], "app-manifest-webpack-plugin for \"/home/gkleen/projects/uni2work/static/wp-4.41/iconstats-[hash].json\"": [ { "chunks": { diff --git a/test/Handler/CommonSpec.hs b/test/Handler/CommonSpec.hs index 334bee7d5..27be88c40 100644 --- a/test/Handler/CommonSpec.hs +++ b/test/Handler/CommonSpec.hs @@ -15,7 +15,8 @@ spec = withApp $ do it "has correct User-agent" $ do get $ WellKnownR RobotsTxt bodyContains "User-agent: *" - describe "favicon.ico" $ do - it "gives a 200" $ do - get $ WellKnownR FaviconIco - statusIs 200 + -- FIXME: deprecated, check for assets/favicons instead! + --describe "favicon.ico" $ do + -- it "gives a 200" $ do + -- get $ WellKnownR FaviconIco + -- statusIs 200 From d7739063430d3c92b8684086705dd8e8c1b84f17 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 01:12:22 +0200 Subject: [PATCH 41/58] build(Makefile): revise assets targets --- Makefile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 37cf6fbba..7145adc25 100644 --- a/Makefile +++ b/Makefile @@ -105,21 +105,15 @@ node_modules: package.json package-lock.json package-lock.json: package.json npm install --cache .npm --prefer-offline -# FIXME: refraining from targets below assets/ (e.g. assets/icons, assets/favicon) to avoid / in target name for now (and maybe to avoid target name pollution) -assets: node_modules -# favicons +assets: assets/favicons assets/icons +assets/favicons: ./utils/faviconize.pl assets/favicon.svg long assets/favicons -# site icons +assets/icons: node_modules ./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/solid utils/rename-fa.json assets/icons/fradrive ./utils/renamer.pl node_modules/@fortawesome/fontawesome-free/svgs/regular utils/rename-fa.json assets/icons/fradrive -assets/.assets: -# no-op target -well-known: node_modules assets well-known/.well-known +well-known: node_modules assets npx webpack --progress - touch well-known/.well-known -well-known/.well-known: -# no-op target ##### FRONTEND TARGETS ##### ############################ From 8f52c848e8d1df3c857bdd70f423a49cfb70859d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 01:27:20 +0200 Subject: [PATCH 42/58] chore(frontend): update webpack config (remove realfavicon-gen) --- webpack.config.js | 88 ++++++++++------------------------------------- 1 file changed, 18 insertions(+), 70 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index d4c18129f..636e7f61d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -20,7 +20,6 @@ import TerserPlugin from 'terser-webpack-plugin'; import yaml from 'js-yaml'; import postcssPresetEnv from 'postcss-preset-env'; import RemovePlugin from 'remove-files-webpack-plugin'; -import RealFaviconPlugin from 'real-favicon-webpack-plugin'; import crypto from 'crypto'; // import { version as webpackVersion } from 'webpack/package.json' assert { type: 'json' }; // version.split('.').slice(0, 2).join('.'); @@ -31,21 +30,9 @@ const webpackVersion = webpackJson.version.split('.').slice(0, 2).join('.'); import packageJson from './package.json' assert { type: "json" }; const packageVersion = packageJson.version; -import faviconJson from './config/favicon.json' assert { type: 'json' }; - async function webpackConfig() { const wellKnownCacheDir = resolve('.cache/well-known'); const assetsDirectory = resolve('assets'); - let faviconApiVersion = undefined; - - if (!fs.existsSync(wellKnownCacheDir)) { - try { - const faviconApiChangelog = await axios.get('https://realfavicongenerator.net/api/versions'); - faviconApiVersion = faviconApiChangelog.data.filter(vObj => vObj.relevance.automated_update).slice(-1)[0].version; - } catch(e) { - console.error(e); - } - } return { module: { @@ -142,6 +129,7 @@ async function webpackConfig() { new webpack.DefinePlugin({ VERSION: JSON.stringify(packageVersion) }), + /* TODO: deprecated due to removal of online favicon generation; is this still needed? ...(() => { const langs = new Set(); function findLangs(json) { @@ -201,68 +189,28 @@ async function webpackConfig() { console.error(e); } - if (faviconApiVersion) { - cacheHash.update(faviconApiVersion); - } const versionDigest = cacheHash.digest('hex'); return Array.from(langs).map(lang => { - const faviconConfig = { versioning: { param_name: 'v', param_value: versionDigest.substr(0,10) }, ...langJsons[lang] }; + const tmpobj = tmp.fileSync({ postfix: ".json" }); + fs.writeSync(tmpobj.fd, JSON.stringify(faviconConfig)); + fs.close(tmpobj.fd); - const cacheDirectory = resolve('.well-known-cache', `${cacheDigest}-${lang}`); - - if (fs.existsSync(wellKnownCacheDir)) { - console.log("Using favicons generated by nix"); - return [ - new CopyPlugin({ - patterns: [ - { from: resolve(wellKnownCacheDir, lang), to: resolve('well-known', lang) } - ] + return [ + new CopyPlugin({ + patterns: [ + { from: 'config/robots.txt', to: resolve('well-known', lang, 'robots.txt') }, + ] + }), + { apply: compiler => compiler.hooks.afterEmit.tap('AfterEmitPlugin', compilation => { + const imgFiles = globSync(resolve('well-known', lang) + '/*.@(png)'); + const imgFilesArgs = Array.from(imgFiles).join(" "); + execSync(`exiftool -overwrite_original -all= ${imgFilesArgs}`, { stdio: 'inherit' }); }) - ]; - } else if (fs.existsSync(cacheDirectory) && (!faviconApiVersion || faviconApiVersion === cachedVersion)) { - console.log(`Using cached well-known from ${cacheDirectory} for ${lang}`); - return [ - new CopyPlugin({ - patterns: [ - { from: cacheDirectory, to: resolve('well-known', lang) } - ] - }) - ]; - } else { - const tmpobj = tmp.fileSync({ postfix: ".json" }); - fs.writeSync(tmpobj.fd, JSON.stringify(faviconConfig)); - fs.close(tmpobj.fd); - - return [ - new RealFaviconPlugin({ - faviconJson: relative(".", tmpobj.name), - outputPath: resolve('well-known', lang), - inject: false - }), - new CopyPlugin({ - patterns: [ - { from: 'config/robots.txt', to: resolve('well-known', lang, 'robots.txt') }, - ] - }), - { apply: compiler => compiler.hooks.afterEmit.tap('AfterEmitPlugin', compilation => { - const imgFiles = globSync(resolve('well-known', lang) + '/*.@(png)'); - const imgFilesArgs = Array.from(imgFiles).join(" "); - execSync(`exiftool -overwrite_original -all= ${imgFilesArgs}`, { stdio: 'inherit' }); - }) - }, - { apply: compiler => compiler.hooks.afterEmit.tap('AfterEmitPlugin', compilation => { - fs.ensureDirSync('.well-known-cache'); - fs.copySync(resolve('well-known', lang), cacheDirectory); - if (!fs.existsSync(versionFile)) { - fs.writeFileSync(versionFile, faviconApiVersion, { encoding: 'utf8' }); - } - }) - } - ]; - } + } + ]; }).flat(1); - })() + })() */ ], output: { @@ -303,4 +251,4 @@ async function webpackConfig() { }; } -export default webpackConfig; +export default webpackConfig; \ No newline at end of file From d82cca843a5a1e703735fc4fceb3317b96af4bf6 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 01:27:45 +0200 Subject: [PATCH 43/58] build(Makefile): add %-shell stub --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 7145adc25..53c076b9a 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,11 @@ release: git commit -m "chore(release): ${VERSION}" git push +.PHONY: %-shell +%-shell: + @echo "TODO: build specified container, run it and drop into bash" + exit 1 + ##### GENERAL TARGETS ##### ########################### From 2a49cea4de690cb381d1a19e335ab85c92da7bcb Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 01:43:14 +0200 Subject: [PATCH 44/58] build(Makefile): add target to start interactive shells inside containers --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 53c076b9a..10c052ea0 100644 --- a/Makefile +++ b/Makefile @@ -38,8 +38,10 @@ release: .PHONY: %-shell %-shell: - @echo "TODO: build specified container, run it and drop into bash" - exit 1 + MOUNT_DIR=/mnt/fradrive ; \ + FRADRIVE_SERVICE=$* ; \ + $(MAKE) -- --image-build FRADRIVE_SERVICE=$${FRADRIVE_SERVICE} ; \ + $(CONTAINER_COMMAND) run -it -v $(PWD):$${MOUNT_DIR} $(CONTAINER_PORTS) --env IN_CONTAINER=true --entrypoint /bin/bash --name fradrive.$${FRADRIVE_SERVICE}.interactive.$$(date +'%Y-%m-%dT%H-%M-%S') fradrive/$${FRADRIVE_SERVICE} ##### GENERAL TARGETS ##### ########################### From 9965b78ddbfbb0072cd61c66e0c552e1bf895534 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 01:43:42 +0200 Subject: [PATCH 45/58] chore(frontend): update package.json (remove real-favicon-webpack-plugin) --- package-lock.json | 1154 +-------------------------------------------- package.json | 1 - 2 files changed, 10 insertions(+), 1145 deletions(-) diff --git a/package-lock.json b/package-lock.json index f2bdb0a74..6c6443122 100644 --- a/package-lock.json +++ b/package-lock.json @@ -64,7 +64,6 @@ "null-loader": "^4.0.1", "postcss-loader": "^8.1.1", "postcss-preset-env": "^10.0.2", - "real-favicon-webpack-plugin": "^0.2.3", "remove-files-webpack-plugin": "^1.5.0", "resolve-url-loader": "^5.0.0", "sass": "^1.77.8", @@ -3601,14 +3600,6 @@ "@types/node": "*" } }, - "node_modules/@types/html-minifier-terser": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.2.tgz", - "integrity": "sha512-h4lTMgMJctJybDp8CQrxTUiiYmedihHWkjnF/8Pxseu2S6Nlfcy8kwboQ8yejh456rP2yWoEVm1sS/FVsfM48w==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", @@ -3660,73 +3651,6 @@ "undici-types": "~6.19.2" } }, - "node_modules/@types/source-list-map": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.6.tgz", - "integrity": "sha512-5JcVt1u5HDmlXkwOD2nslZVllBBc7HDuOICfiZah2Z0is8M8g+ddAEawbmd3VjedfDHBzxCaXLs07QEmb7y54g==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@types/tapable": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.12.tgz", - "integrity": "sha512-bTHG8fcxEqv1M9+TD14P8ok8hjxoOCkfKc8XXLaaD05kI7ohpeI956jtDOD3XHKBQrlyPughUtzm1jtVhHpA5Q==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/@types/uglify-js": { - "version": "3.17.5", - "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.17.5.tgz", - "integrity": "sha512-TU+fZFBTBcXj/GpDpDaBmgWk/gn96kMZ+uocaFUlV2f8a6WdMzzI44QBCmGcCiYR0Y6ZlNRiyUyKKt5nl/lbzQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "source-map": "^0.6.1" - } - }, - "node_modules/@types/webpack": { - "version": "4.41.39", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.39.tgz", - "integrity": "sha512-otxUJvoi6FbBq/64gGH34eblpKLgdi+gf08GaAh8Bx6So0ZZic028Ev/SUxD22gbthMKCkeeiXEat1kHLDJfYg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/node": "*", - "@types/tapable": "^1", - "@types/uglify-js": "*", - "@types/webpack-sources": "*", - "anymatch": "^3.0.0", - "source-map": "^0.6.0" - } - }, - "node_modules/@types/webpack-sources": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-3.2.3.tgz", - "integrity": "sha512-4nZOdMwSPHZ4pTEZzSp0AsTM4K7Qmu40UKW4tJDiOVs20UzYF9l+qUe4s0ftfN0pin06n+5cWWDJXH+sbhAiDw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/node": "*", - "@types/source-list-map": "*", - "source-map": "^0.7.3" - } - }, - "node_modules/@types/webpack-sources/node_modules/source-map": { - "version": "0.7.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", - "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "engines": { - "node": ">= 8" - } - }, "node_modules/@types/yargs": { "version": "17.0.33", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", @@ -4232,29 +4156,6 @@ "node": ">=0.10.0" } }, - "node_modules/array.prototype.reduce": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/array.prototype.reduce/-/array.prototype.reduce-1.0.7.tgz", - "integrity": "sha512-mzmiUCVwtiD4lgxYP8g7IYy8El8p2CSMePvIbTS7gchKir/L1fgJrk0yDKmAX6mnRQFKNADYIk8nNlTris5H1Q==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-array-method-boxes-properly": "^1.0.0", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.0.0", - "is-string": "^1.0.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/arraybuffer.prototype.slice": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", @@ -4330,13 +4231,6 @@ "inherits": "2.0.3" } }, - "node_modules/async": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", - "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", - "dev": true, - "license": "MIT" - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -4525,20 +4419,6 @@ "node": "*" } }, - "node_modules/binary": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", - "integrity": "sha512-D4H1y5KYwpJgK8wk1Cue5LLPgmwHKYSChkbspQg5JtVuR5ulGckxfR62H3AE9UDkdMC8yyXlqYihuz3Aqg2XZg==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffers": "~0.1.1", - "chainsaw": "~0.1.0" - }, - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -4581,9 +4461,9 @@ "peer": true }, "node_modules/body-parser": { - "version": "1.20.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", - "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "dev": true, "license": "MIT", "dependencies": { @@ -4595,7 +4475,7 @@ "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", + "qs": "6.13.0", "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" @@ -5034,15 +4914,6 @@ "license": "MIT", "peer": true }, - "node_modules/buffers": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", - "integrity": "sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==", - "dev": true, - "engines": { - "node": ">=0.2.0" - } - }, "node_modules/builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", @@ -5099,18 +4970,6 @@ "node": ">=6" } }, - "node_modules/camel-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", - "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, "node_modules/caniuse-api": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", @@ -5154,19 +5013,6 @@ "nanoassert": "^2.0.0" } }, - "node_modules/chainsaw": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", - "integrity": "sha512-75kWfWt6MEKNC8xYXIdRpDehRYY/tNSgwKaJq+dbbDcxORuVrrQ+SEHoWsniVn9XPYfP4gmdWIeDk/4YNp1rNQ==", - "dev": true, - "license": "MIT/X11", - "dependencies": { - "traverse": ">=0.3.0 <0.4" - }, - "engines": { - "node": "*" - } - }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -5182,205 +5028,6 @@ "node": ">=4" } }, - "node_modules/cheerio": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0.tgz", - "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==", - "dev": true, - "license": "MIT", - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "encoding-sniffer": "^0.2.0", - "htmlparser2": "^9.1.0", - "parse5": "^7.1.2", - "parse5-htmlparser2-tree-adapter": "^7.0.0", - "parse5-parser-stream": "^7.1.2", - "undici": "^6.19.5", - "whatwg-mimetype": "^4.0.0" - }, - "engines": { - "node": ">=18.17" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cheerio-select/node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/cheerio-select/node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/cheerio-select/node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/cheerio-select/node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/cheerio-select/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/domutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.1.0.tgz", - "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/cheerio/node_modules/htmlparser2": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-9.1.0.tgz", - "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.1.0", - "entities": "^4.5.0" - } - }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -5444,20 +5091,6 @@ "safe-buffer": "^5.0.1" } }, - "node_modules/clean-css": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz", - "integrity": "sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "source-map": "~0.6.0" - }, - "engines": { - "node": ">= 4.0" - } - }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -5900,7 +5533,8 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/cors": { "version": "2.8.5", @@ -6217,24 +5851,6 @@ "postcss": "^8.4" } }, - "node_modules/css-select": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz", - "integrity": "sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.0.1", - "domhandler": "^4.3.1", - "domutils": "^2.8.0", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, "node_modules/css-tree": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", @@ -6775,17 +6391,6 @@ "node": ">=4" } }, - "node_modules/dom-converter": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", - "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "utila": "~0.4" - } - }, "node_modules/dom-serialize": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz", @@ -6799,22 +6404,6 @@ "void-elements": "^2.0.0" } }, - "node_modules/dom-serializer": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", - "integrity": "sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.2.0", - "entities": "^2.0.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, "node_modules/domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -6840,51 +6429,6 @@ ], "license": "BSD-2-Clause" }, - "node_modules/domhandler": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz", - "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "domelementtype": "^2.2.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz", - "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.2.0", - "domhandler": "^4.2.0" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/dot-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", - "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -7013,33 +6557,6 @@ "node": ">= 0.8" } }, - "node_modules/encoding-sniffer": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz", - "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "^0.6.3", - "whatwg-encoding": "^3.1.1" - }, - "funding": { - "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" - } - }, - "node_modules/encoding-sniffer/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -7119,17 +6636,6 @@ "node": ">= 0.4" } }, - "node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/env-paths": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz", @@ -7224,14 +6730,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-array-method-boxes-properly": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", - "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -8096,23 +7594,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/fstream": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", - "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", - "deprecated": "This package is no longer supported.", - "dev": true, - "license": "ISC", - "dependencies": { - "graceful-fs": "^4.1.2", - "inherits": "~2.0.0", - "mkdirp": ">=0.5 0", - "rimraf": "2" - }, - "engines": { - "node": ">=0.6" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -8524,17 +8005,6 @@ "node": "*" } }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "license": "MIT", - "peer": true, - "bin": { - "he": "bin/he" - } - }, "node_modules/hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -8555,95 +8025,6 @@ "dev": true, "license": "ISC" }, - "node_modules/html-minifier-terser": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz", - "integrity": "sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "camel-case": "^4.1.1", - "clean-css": "^4.2.3", - "commander": "^4.1.1", - "he": "^1.2.0", - "param-case": "^3.0.3", - "relateurl": "^0.2.7", - "terser": "^4.6.3" - }, - "bin": { - "html-minifier-terser": "cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/html-minifier-terser/node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/html-webpack-plugin": { - "version": "4.5.2", - "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.5.2.tgz", - "integrity": "sha512-q5oYdzjKUIPQVjOosjgvCHQOv9Ett9CYYHlgvJeXG0qQvdSojnBq4vAdQBwn1+yGveAwHCoe/rMR86ozX3+c2A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/html-minifier-terser": "^5.0.0", - "@types/tapable": "^1.0.5", - "@types/webpack": "^4.41.8", - "html-minifier-terser": "^5.0.1", - "loader-utils": "^1.2.3", - "lodash": "^4.17.20", - "pretty-error": "^2.1.1", - "tapable": "^1.1.3", - "util.promisify": "1.0.0" - }, - "engines": { - "node": ">=6.9" - }, - "peerDependencies": { - "webpack": "^4.0.0 || ^5.0.0" - } - }, - "node_modules/html-webpack-plugin/node_modules/json5": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", - "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/html-webpack-plugin/node_modules/loader-utils": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.2.tgz", - "integrity": "sha512-I5d00Pd/jwMD2QCduo657+YM/6L3KZu++pmX9VFncxaxvHcru9jx1lBaFft+r4Mt2jK0Yhp41XlRAihzPxHNCg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, "node_modules/htmlescape": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", @@ -8655,27 +8036,6 @@ "node": ">=0.10" } }, - "node_modules/htmlparser2": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", - "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "license": "MIT", - "peer": true, - "dependencies": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "domutils": "^2.5.2", - "entities": "^2.0.0" - } - }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -9415,13 +8775,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true, - "license": "MIT" - }, "node_modules/isbinaryfile": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz", @@ -10288,17 +9641,6 @@ "node": ">=8.0" } }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -10333,17 +9675,6 @@ "semver": "bin/semver" } }, - "node_modules/match-stream": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/match-stream/-/match-stream-0.0.2.tgz", - "integrity": "sha512-TbN21KrvmZ4mHzKqSFeNNNYeOGNNoEE0sQjhOGlHc+W6XhV4nEhJqaQTJj106NF+NYjyJ7pXh23+OQ1d306ORw==", - "dev": true, - "license": "MIT", - "dependencies": { - "buffers": "~0.1.1", - "readable-stream": "~1.0.0" - } - }, "node_modules/md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -10400,19 +9731,6 @@ "node": ">= 8" } }, - "node_modules/metaparser": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/metaparser/-/metaparser-1.0.7.tgz", - "integrity": "sha512-9f7r6vL2F9LA7T6tvt5cwBrNOfjb7QgGpbnv5qgvCInlQyfBfJV5i+yvvm3b2667N4FF5fJrGVIsnSCTevR8zQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "async": "*", - "cheerio": "*", - "mkdirp": "*", - "underscore": "*" - } - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -10795,18 +10113,6 @@ "dev": true, "license": "MIT" }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, "node_modules/node-releases": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", @@ -10814,21 +10120,6 @@ "dev": true, "license": "MIT" }, - "node_modules/node-unzip-2": { - "version": "0.2.8", - "resolved": "https://registry.npmjs.org/node-unzip-2/-/node-unzip-2-0.2.8.tgz", - "integrity": "sha512-fmJi73zTRW7RSo/1wyrKc2srKMwb3L6Ppke/7elzQ0QRt6sUjfiIcVsWdrqO5uEHAdvRKXjoySuo4HYe5BB0rw==", - "dev": true, - "license": "MIT", - "dependencies": { - "binary": "~0.3.0", - "fstream": "~1.0.12", - "match-stream": "~0.0.2", - "pullstream": "~0.4.0", - "readable-stream": "~1.0.0", - "setimmediate": "~1.0.1" - } - }, "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -13430,29 +12721,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.8.tgz", - "integrity": "sha512-qkHIGe4q0lSYMv0XI4SsBTJz3WaURhLvd0lKSgtVuOsJ2krg4SgMw3PIRQFMp07yi++UR3se2mkcLqsBNpBb/A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "array.prototype.reduce": "^1.0.6", - "call-bind": "^1.0.7", - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0", - "gopd": "^1.0.1", - "safe-array-concat": "^1.1.2" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/on-finished": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", @@ -13548,16 +12816,6 @@ "shell-quote": "^1.4.2" } }, - "node_modules/over": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/over/-/over-0.0.5.tgz", - "integrity": "sha512-EEc3GCT5ce2VgLYKGeomTSgQT+4wkS13Ya9XzKiskHtemWPx0YhVErn7PtiowTOsYtRlFe6FksgwFeWG1aOJdg==", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/p-finally": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-2.0.1.tgz", @@ -13635,18 +12893,6 @@ "license": "(MIT AND Zlib)", "peer": true }, - "node_modules/param-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", - "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -13709,75 +12955,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "license": "MIT", - "dependencies": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, - "license": "MIT", - "dependencies": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter/node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/parse5-parser-stream": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", - "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", - "dev": true, - "license": "MIT", - "dependencies": { - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5/node_modules/entities": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", - "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -13788,18 +12965,6 @@ "node": ">= 0.8" } }, - "node_modules/pascal-case": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", - "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, "node_modules/path-browserify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", @@ -15404,18 +14569,6 @@ "node": ">= 0.8.0" } }, - "node_modules/pretty-error": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz", - "integrity": "sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "lodash": "^4.17.20", - "renderkid": "^2.0.4" - } - }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -15466,19 +14619,6 @@ "license": "MIT", "peer": true }, - "node_modules/pullstream": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/pullstream/-/pullstream-0.4.1.tgz", - "integrity": "sha512-8ckaufxE74rtbwA0lD0GO2Pk/miCfje3uZtGZd/MQpxkoRIBB004aKBnhdc4Y8L7sip0cis/ekib/1lUwUwxuA==", - "dev": true, - "license": "MIT", - "dependencies": { - "over": ">= 0.0.5 < 1", - "readable-stream": "~1.0.31", - "setimmediate": ">= 1.0.2 < 2", - "slice-stream": ">= 1.0.0 < 2" - } - }, "node_modules/pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -15508,13 +14648,13 @@ } }, "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -15695,19 +14835,6 @@ "node": ">=4" } }, - "node_modules/readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha512-ok1qVCJuRkNmvebYikljxJA/UEsKwLl2nI1OmaqAu4/UE+h0wKCHok4XkL/gvi39OacXvw59RJUOFUkDib2rHg==", - "dev": true, - "license": "MIT", - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -15721,19 +14848,6 @@ "node": ">=8.10.0" } }, - "node_modules/real-favicon-webpack-plugin": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/real-favicon-webpack-plugin/-/real-favicon-webpack-plugin-0.2.3.tgz", - "integrity": "sha512-w9CS4DdISimLk+hD1qAqVstWfkAXLpnU7a7UOmArHR1pDnmB4SYBO/fwfuu+ObWEcWtIkfsAhJaD6eKSN4Bq6A==", - "dev": true, - "license": "MIT", - "dependencies": { - "rfg-api": "^0.5.0" - }, - "peerDependencies": { - "html-webpack-plugin": "^4.0.0-beta.5" - } - }, "node_modules/rechoir": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", @@ -15849,17 +14963,6 @@ "jsesc": "bin/jsesc" } }, - "node_modules/relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/remove-files-webpack-plugin": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/remove-files-webpack-plugin/-/remove-files-webpack-plugin-1.5.0.tgz", @@ -15899,46 +15002,6 @@ "node": ">=6" } }, - "node_modules/renderkid": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.7.tgz", - "integrity": "sha512-oCcFyxaMrKsKcTY59qnCAtmDVSLfPbrv6A3tVbPdFMMrv5jaK10V6m40cKsoPNhAqN6rmHW9sswW4o3ruSrwUQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "css-select": "^4.1.3", - "dom-converter": "^0.2.0", - "htmlparser2": "^6.1.0", - "lodash": "^4.17.21", - "strip-ansi": "^3.0.1" - } - }, - "node_modules/renderkid/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/renderkid/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -16059,33 +15122,6 @@ "dev": true, "license": "MIT" }, - "node_modules/rfg-api": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/rfg-api/-/rfg-api-0.5.3.tgz", - "integrity": "sha512-KQ4Vwc/LrwQ1IFBDEyJdGtn1XsII1GDowLRTtY+rAbJav9R5wwxZiyIQOcetDYKSTH551v9b+Gn4CPw9noQ0bQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "axios": "^0.21.1", - "fstream": "^1.0.2", - "metaparser": "^1.0.7", - "mkdirp": "^0.5.0", - "node-unzip-2": "^0.2.7" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/rfg-api/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dev": true, - "license": "MIT", - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, "node_modules/rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", @@ -16400,13 +15436,6 @@ "node": ">= 0.4" } }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", - "dev": true, - "license": "MIT" - }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -16599,16 +15628,6 @@ "node": ">=6" } }, - "node_modules/slice-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-stream/-/slice-stream-1.0.0.tgz", - "integrity": "sha512-fJu1TYTr85OZEkT4lqcCW6oPWPIS5omPnIsB/dL7QWo2sNk03VQ6did4plhh0y3Sf0nJlq5QEUR3vMYevydn7w==", - "dev": true, - "license": "MIT", - "dependencies": { - "readable-stream": "~1.0.31" - } - }, "node_modules/socket.io": { "version": "4.7.5", "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz", @@ -16994,13 +16013,6 @@ "node": ">= 4.0.0" } }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "dev": true, - "license": "MIT" - }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -17396,36 +16408,6 @@ "acorn-node": "^1.2.0" } }, - "node_modules/tapable": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", - "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/terser": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.1.tgz", - "integrity": "sha512-4GnLC0x667eJG0ewJTa6z/yXrbLGv80D9Ru6HIpCQmO+Q4PfEtBFi0ObSckqwL6VyQv/7ENJieXHo2ANmdQwgw==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - }, - "bin": { - "terser": "bin/terser" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/terser-webpack-plugin": { "version": "5.3.10", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", @@ -17547,14 +16529,6 @@ "node": ">=10" } }, - "node_modules/terser/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -17810,24 +16784,6 @@ "node": ">=0.10.0" } }, - "node_modules/traverse": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", - "integrity": "sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==", - "dev": true, - "license": "MIT/X11", - "engines": { - "node": "*" - } - }, - "node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", - "dev": true, - "license": "0BSD", - "peer": true - }, "node_modules/tty-browserify": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", @@ -18017,23 +16973,6 @@ "undeclared-identifiers": "bin.js" } }, - "node_modules/underscore": { - "version": "1.13.7", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", - "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", - "dev": true, - "license": "MIT" - }, - "node_modules/undici": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz", - "integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.17" - } - }, "node_modules/undici-types": { "version": "6.19.8", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", @@ -18184,23 +17123,6 @@ "node": ">= 0.4" } }, - "node_modules/url/node_modules/qs": { - "version": "6.13.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", - "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "side-channel": "^1.0.6" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/user-home": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/user-home/-/user-home-2.0.0.tgz", @@ -18236,26 +17158,6 @@ "dev": true, "license": "MIT" }, - "node_modules/util.promisify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz", - "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "define-properties": "^1.1.2", - "object.getownpropertydescriptors": "^2.0.3" - } - }, - "node_modules/utila": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz", - "integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -18598,48 +17500,12 @@ "node": ">=6" } }, - "node_modules/whatwg-encoding": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", - "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "iconv-lite": "0.6.3" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/whatwg-encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/whatwg-fetch": { "version": "3.6.20", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz", "integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==", "license": "MIT" }, - "node_modules/whatwg-mimetype": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", - "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - } - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/package.json b/package.json index f4cfa0f0d..15a4082f4 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,6 @@ "null-loader": "^4.0.1", "postcss-loader": "^8.1.1", "postcss-preset-env": "^10.0.2", - "real-favicon-webpack-plugin": "^0.2.3", "remove-files-webpack-plugin": "^1.5.0", "resolve-url-loader": "^5.0.0", "sass": "^1.77.8", From 4b0bbbd317562f681af1b951c4ca7bfa66051bdb Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 01:47:56 +0200 Subject: [PATCH 46/58] build(Makefile): add db-fill stub --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 10c052ea0..31e2b664b 100644 --- a/Makefile +++ b/Makefile @@ -182,6 +182,11 @@ database: .stack .stack-work.lock compile-backend-prod serve-database: CONTAINER_INTERACTIVE=-it serve-database: --containerized-database +.PHONY: database-% +database-%: + @echo "This target, intended to fill, clear, migrate, ... the database using uniworxdb from inside the backend container is yet to be implemented" + exit 1 + .PHONY: .stack .stack: stack.yaml stack.yaml.lock .stack: From c5749967145405555a6d010ac2d76404c6d21526 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 01:55:03 +0200 Subject: [PATCH 47/58] build(Makefile): pass WATCH var to make inside container --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 31e2b664b..06b1967ed 100644 --- a/Makefile +++ b/Makefile @@ -248,7 +248,7 @@ image-rebuild-%: if [ "$(IN_CONTAINER)" == "true" ] ; then \ $(MAKE) -- $* ; \ else \ - $(CONTAINER_COMMAND) run $(CONTAINER_INTERACTIVE) -v $(PWD):$${MOUNT_DIR} $(CONTAINER_PORTS) --env IN_CONTAINER=true --env FRADRIVE_MAKE_TARGET=$* --name fradrive.$(FRADRIVE_SERVICE).$$(date +'%Y-%m-%dT%H-%M-%S') fradrive/$(FRADRIVE_SERVICE) ; \ + $(CONTAINER_COMMAND) run $(CONTAINER_INTERACTIVE) -v $(PWD):$${MOUNT_DIR} $(CONTAINER_PORTS) --env IN_CONTAINER=true --env FRADRIVE_MAKE_TARGET=$* --env WATCH=$(WATCH) --name fradrive.$(FRADRIVE_SERVICE).$$(date +'%Y-%m-%dT%H-%M-%S') fradrive/$(FRADRIVE_SERVICE) ; \ fi ##### CONTAINER TARGETS ##### From 793ed1af32fcf61d3695233c6e3b4766c8a17e1c Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 19 Sep 2024 11:34:24 +0200 Subject: [PATCH 48/58] build(Makefile): clean more files and dirs --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 06b1967ed..ffa140967 100644 --- a/Makefile +++ b/Makefile @@ -23,9 +23,9 @@ all: .PHONY: clean clean: - rm -rf node_modules .npm .cache assets/icons assets/favicons well-known static/ + rm -rf node_modules .npm .cache assets/icons assets/favicons well-known .well-known-cache static/ rm -rf .stack .stack-work .stack-work-build .stack-work-run .stack-work-test .stack-work-doc - rm -rf bin/ + rm -rf bin/ .Dockerfile .dev-port-http .dev-port-https .PHONY: release release: From 734c82eff7fbe3d3a166f2813731b89f2f2e7c6d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 19 Sep 2024 13:02:46 +0200 Subject: [PATCH 49/58] build(frontend): create well-known based on new i18n.json --- config/i18n.json | 5 ++++ webpack.config.js | 65 +++++++++++++++-------------------------------- 2 files changed, 26 insertions(+), 44 deletions(-) create mode 100644 config/i18n.json diff --git a/config/i18n.json b/config/i18n.json new file mode 100644 index 000000000..26938eb86 --- /dev/null +++ b/config/i18n.json @@ -0,0 +1,5 @@ +{ + "_i18n": true, + "de-de-formal": "Ein webbasiertes Schulungsverwaltungssystem", + "en-eu": "A web-based training management system" +} \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 636e7f61d..d9b28412b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -29,10 +29,14 @@ import webpackJson from 'webpack/package.json' assert { type: "json" }; const webpackVersion = webpackJson.version.split('.').slice(0, 2).join('.'); import packageJson from './package.json' assert { type: "json" }; const packageVersion = packageJson.version; +import i18nJson from './config/i18n.json' assert { type: 'json' }; async function webpackConfig() { - const wellKnownCacheDir = resolve('.cache/well-known'); - const assetsDirectory = resolve('assets'); + const wellKnownDir = 'well-known'; + const wellKnownCacheDir = '.cache/well-known'; + const staticDir = 'static'; + const assetsDir = 'assets'; + const faviconsDir = `${assetsDir}/favicons`; return { module: { @@ -118,8 +122,8 @@ async function webpackConfig() { serialize: yaml.dump }), new CleanWebpackPlugin({ - cleanOnceBeforeBuildPatterns: [ resolve('static'), - resolve('well-known'), + cleanOnceBeforeBuildPatterns: [ resolve(staticDir), + resolve(wellKnownDir), ] }), new webpack.IgnorePlugin({ @@ -129,47 +133,28 @@ async function webpackConfig() { new webpack.DefinePlugin({ VERSION: JSON.stringify(packageVersion) }), - /* TODO: deprecated due to removal of online favicon generation; is this still needed? ...(() => { const langs = new Set(); - function findLangs(json) { + function findLangs(json, langs = new Set()) { if (json && json._i18n) { Object.keys(json).forEach(key => { if (key !== '_i18n') { langs.add(key); } }) - } else if (Array.isArray(json)) { - json.forEach(elem => findLangs(elem)); - } else if (typeof json === 'object') { - Object.keys(json).forEach(key => findLangs(json[key])); - } - } - findLangs(faviconJson); - - function selectLang(lang, json) { - if (json && json._i18n) { - return json[lang]; - } else if (Array.isArray(json)) { - return json.map(elem => selectLang(lang, elem)); - } else if (typeof json === 'object') { - return Object.fromEntries(Object.entries(json).map(([k, v]) => [k, selectLang(lang, v)])); } else { - return json; + console.error('Invalid i18nJson format!'); } + return langs; } - - const langJsons = {}; - Array.from(langs).forEach(lang => { - langJsons[lang] = selectLang(lang, faviconJson); - }); + findLangs(i18nJson, langs); const cacheHash = crypto.createHash('sha256'); - cacheHash.update(JSON.stringify(langJsons)); + cacheHash.update(JSON.stringify(langs)); const cacheFiles = new Set([ - ...(Array.from(langs).map(lang => resolve(langJsons[lang].masterPicture))), resolve('config/robots.txt'), + resolve('assets/favicon.svg'), ]); for (const cacheFile of cacheFiles) { @@ -180,7 +165,7 @@ async function webpackConfig() { let cachedVersion = undefined; - const versionFile = resolve('.well-known-cache', `${cacheDigest}.version`); + const versionFile = resolve(wellKnownCacheDir, `${cacheDigest}.version`); try { if (fs.existsSync(versionFile)) { cachedVersion = fs.readFileSync(versionFile, 'utf8'); @@ -192,32 +177,24 @@ async function webpackConfig() { const versionDigest = cacheHash.digest('hex'); return Array.from(langs).map(lang => { - const tmpobj = tmp.fileSync({ postfix: ".json" }); - fs.writeSync(tmpobj.fd, JSON.stringify(faviconConfig)); - fs.close(tmpobj.fd); - return [ new CopyPlugin({ patterns: [ - { from: 'config/robots.txt', to: resolve('well-known', lang, 'robots.txt') }, + { from: 'config/robots.txt', to: resolve(wellKnownDir, lang, 'robots.txt') }, + { from: `${faviconsDir}/include.html`, to: resolve(wellKnownDir, lang, 'html_code.html') }, + { from: `${faviconsDir}/*.png`, to: resolve(wellKnownDir, lang, '[name][ext]') }, ] }), - { apply: compiler => compiler.hooks.afterEmit.tap('AfterEmitPlugin', compilation => { - const imgFiles = globSync(resolve('well-known', lang) + '/*.@(png)'); - const imgFilesArgs = Array.from(imgFiles).join(" "); - execSync(`exiftool -overwrite_original -all= ${imgFilesArgs}`, { stdio: 'inherit' }); - }) - } ]; }).flat(1); - })() */ + })() ], output: { chunkFilename: '[chunkhash].js', filename: '[chunkhash].js', - path: resolve('static', `wp-${webpackVersion}`), - publicPath: `/static/res/wp-${webpackVersion}/`, + path: resolve(staticDir, `wp-${webpackVersion}`), + publicPath: `/${staticDir}/res/wp-${webpackVersion}/`, hashFunction: 'shake256', hashDigestLength: 36 }, From dfc314fa8256f50165fb9c09fb0ae97eda1848e8 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 19 Sep 2024 13:03:25 +0200 Subject: [PATCH 50/58] build(Makefile): update clean --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ffa140967..5238b2be2 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ all: .PHONY: clean clean: - rm -rf node_modules .npm .cache assets/icons assets/favicons well-known .well-known-cache static/ + rm -rf node_modules .npm .cache assets/icons assets/favicons static well-known rm -rf .stack .stack-work .stack-work-build .stack-work-run .stack-work-test .stack-work-doc rm -rf bin/ .Dockerfile .dev-port-http .dev-port-https From 0389fadd412d828a4d8885fd06234415fc3b8f1d Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Thu, 19 Sep 2024 16:49:12 +0200 Subject: [PATCH 51/58] chore: gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6db07f7bf..ed502f847 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ cabal-dev/ .dev-port-http .dev-port-https .bash_history +.lesshst yesod-devel/ .cabal-sandbox cabal.sandbox.config @@ -61,4 +62,4 @@ tunnel.log **/result **/result-* .develop.cmd -/.vscode \ No newline at end of file +/.vscode From 01a75dc6e84f267072cba3abccbb0eb8bf73b1ac Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Sep 2024 02:37:20 +0200 Subject: [PATCH 52/58] build(docker): resort to dockerhub images for the moment --- docker/backend/Dockerfile | 2 +- docker/database/Dockerfile | 2 +- docker/frontend/Dockerfile | 2 +- docker/podman/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index 84be254aa..bc2ee5299 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.uniworx.de/uniworx/containers/debian:12.5 +FROM debian:12.5 RUN apt-get -y update && apt-get -y install haskell-stack git RUN apt-get -y update && apt-get -y install alex g++ happy libghc-zlib-dev libpq-dev libsodium-dev locales locales-all pkg-config diff --git a/docker/database/Dockerfile b/docker/database/Dockerfile index c8445762a..204c3029d 100644 --- a/docker/database/Dockerfile +++ b/docker/database/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.uniworx.de/fradrive/fradrive/postgres:12 +FROM postgres:12 # Allow for connecting to database without password authentication ENV POSTGRES_HOST_AUTH_METHOD=trust diff --git a/docker/frontend/Dockerfile b/docker/frontend/Dockerfile index b4c4d29d9..8d59ba76a 100644 --- a/docker/frontend/Dockerfile +++ b/docker/frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM registry.uniworx.de/uniworx/containers/debian:12.5 +FROM debian:12.5 # Basic dependencies RUN apt-get -y update && apt-get -y install curl npm diff --git a/docker/podman/Dockerfile b/docker/podman/Dockerfile index 2d5b6fbfe..e7a950419 100644 --- a/docker/podman/Dockerfile +++ b/docker/podman/Dockerfile @@ -4,7 +4,7 @@ # Yoinked with love from: # https://www.redhat.com/sysadmin/podman-inside-container -FROM registry.uniworx.de/uniworx/containers/debian:12.5 +FROM debian:12.5 RUN apt-get -y update From 0b0502e5e0a9d2437a3bc54ceb3bd12a09744684 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Sep 2024 02:37:58 +0200 Subject: [PATCH 53/58] build(Makefile): implement clean-all target to also cleanup containers, images, and volumes --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5238b2be2..93352e4b7 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,11 @@ clean: rm -rf node_modules .npm .cache assets/icons assets/favicons static well-known rm -rf .stack .stack-work .stack-work-build .stack-work-run .stack-work-test .stack-work-doc rm -rf bin/ .Dockerfile .dev-port-http .dev-port-https +.PHONY: clean-all +clean-all: clean + $(CONTAINER_COMMAND) system prune --all --force --volumes + $(CONTAINER_COMMAND) image prune --all --force + $(CONTAINER_COMMAND) volume prune --force .PHONY: release release: @@ -207,7 +212,7 @@ database-%: .PHONY: --containerized-database --containerized-database: FRADRIVE_SERVICE=database # port forwarding is disabled in --network=host mode; nevertheless it is stated here for documentation reasons ---containerized-database: CONTAINER_PORTS=-p 5432:5432 --network="host" +--containerized-database: CONTAINER_PORTS=-p 127.0.0.1:5432:5432/tcp --containerized-database: --image-build if [ "$(IN_CONTAINER)" == "false" ] ; then \ $(CONTAINER_COMMAND) run -it $(CONTAINER_PORTS) --name fradrive.$(FRADRIVE_SERVICE).$$(date +'%Y-%m-%dT%H-%M-%S') fradrive/$(FRADRIVE_SERVICE) ; \ @@ -222,7 +227,7 @@ database-%: .PHONY: --containerized-%-backend --containerized-%-backend: FRADRIVE_SERVICE=backend #--containerized-%-backend: --image-build --image-run-%-backend; ---containerized-%-backend: CONTAINER_PORTS=-p $(DEV_PORT_HTTP):3000 -p $(DEV_PORT_HTTPS):3443 --network="host" +--containerized-%-backend: CONTAINER_PORTS=-p 127.0.0.1:$(DEV_PORT_HTTP):3000/tcp -p 127.0.0.1:$(DEV_PORT_HTTPS):3443/tcp --containerized-%-backend: --image-build $(MAKE) -- --image-run-$*-backend From aa563bc91c87df7501b991e8bba49a4a3fed5777 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Sep 2024 04:39:52 +0200 Subject: [PATCH 54/58] build(backend): update stack.yaml --- stack.yaml | 28 +++++------ stack.yaml.lock | 128 ++++++++++++++++++++++++------------------------ 2 files changed, 78 insertions(+), 78 deletions(-) diff --git a/stack.yaml b/stack.yaml index ee52c6f73..3c331178f 100644 --- a/stack.yaml +++ b/stack.yaml @@ -26,33 +26,33 @@ packages: - . extra-deps: - - git: https://gitlab.uniworx.de/haskell/encoding.git + - git: https://gitea.uniworx.systems/haskell/encoding.git commit: 22fc3bb14841d8d50997aa47f1be3852e666f787 - - git: https://gitlab.uniworx.de/haskell/memcached-binary.git + - git: https://gitea.uniworx.systems/haskell/memcached-binary.git commit: b7071df50bad3a251a544b984e4bf98fa09b8fae - - git: https://gitlab.uniworx.de/haskell/conduit-resumablesink.git + - git: https://gitea.uniworx.systems/haskell/conduit-resumablesink.git commit: cbea6159c2975d42f948525e03e12fc390da53c5 - git: https://github.com/jtdaugherty/HaskellNet.git commit: 5aa1f3b009253b02c4822005ac59ee208a10a347 - - git: https://gitlab.uniworx.de/haskell/HaskellNet-SSL.git + - git: https://gitea.uniworx.systems/haskell/HaskellNet-SSL.git commit: 40393c938111ac78232dc2c7eec5edb4a22d03e8 - - git: https://gitlab.uniworx.de/haskell/ldap-client.git + - git: https://gitea.uniworx.systems/haskell/ldap-client.git commit: 01afaf599ba6f8a9d804c269e91d3190b249d3f0 - - git: https://gitlab.uniworx.de/haskell/serversession.git + - git: https://gitea.uniworx.systems/haskell/serversession.git commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 subdirs: - serversession - serversession-backend-acid-state - - git: https://gitlab.uniworx.de/haskell/xss-sanitize.git + - git: https://gitea.uniworx.systems/haskell/xss-sanitize.git commit: dc928c3a456074b8777603bea20e81937321777f - - git: https://gitlab.uniworx.de/haskell/colonnade.git + - git: https://gitea.uniworx.systems/haskell/colonnade.git commit: f8170266ab25b533576e96715bedffc5aa4f19fa subdirs: - colonnade - - git: https://gitlab.uniworx.de/haskell/minio-hs.git + - git: https://gitea.uniworx.systems/haskell/minio-hs.git commit: 42103ab247057c04c8ce7a83d9d4c160713a3df1 - - git: https://gitlab.uniworx.de/haskell/cryptoids.git + - git: https://gitea.uniworx.systems/haskell/cryptoids.git commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 subdirs: - cryptoids-class @@ -67,10 +67,10 @@ extra-deps: - gearhash - fastcdc - - git: https://gitlab.uniworx.de/haskell/zip-stream.git + - git: https://gitea.uniworx.systems/haskell/zip-stream.git commit: 843683d024f767de236f74d24a3348f69181a720 - - git: https://gitlab.uniworx.de/haskell/yesod.git + - git: https://gitea.uniworx.systems/haskell/yesod.git commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 # <- references debug with traceStack; master ref: cb75191e0c5490246ae2cbcc2a00e7985cf2aadb subdirs: - yesod-core @@ -88,10 +88,10 @@ extra-deps: - yesod-eventsource - yesod-websockets - - git: https://gitlab.uniworx.de/haskell/cryptonite.git + - git: https://gitea.uniworx.systems/haskell/cryptonite.git commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f - - git: https://gitlab.uniworx.de/haskell/esqueleto.git + - git: https://gitea.uniworx.systems/haskell/esqueleto.git commit: e18dd125c5ea26fa4e88bed079b61d8c1365ee37 - classy-prelude-yesod-1.5.0@sha256:8f7e183bdfd6d2ea9674284c4f285294ab086aff60d9be4e5d7d2f3c1a2b05b7,1330 diff --git a/stack.yaml.lock b/stack.yaml.lock index 8139cc3d1..e7f29eab1 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -6,7 +6,7 @@ packages: - completed: commit: 22fc3bb14841d8d50997aa47f1be3852e666f787 - git: https://gitlab.uniworx.de/haskell/encoding.git + git: https://gitea.uniworx.systems/haskell/encoding.git name: encoding pantry-tree: sha256: fec12328951021bb4d9326ae0b35f0c459e65f28442366efd4366cd1e18abe19 @@ -14,10 +14,10 @@ packages: version: 0.8.2 original: commit: 22fc3bb14841d8d50997aa47f1be3852e666f787 - git: https://gitlab.uniworx.de/haskell/encoding.git + git: https://gitea.uniworx.systems/haskell/encoding.git - completed: commit: b7071df50bad3a251a544b984e4bf98fa09b8fae - git: https://gitlab.uniworx.de/haskell/memcached-binary.git + git: https://gitea.uniworx.systems/haskell/memcached-binary.git name: memcached-binary pantry-tree: sha256: 0da0539b7b9a56d03a116dcd666bc1bbbef085659910420849484d1418aa0857 @@ -25,10 +25,10 @@ packages: version: 0.2.0 original: commit: b7071df50bad3a251a544b984e4bf98fa09b8fae - git: https://gitlab.uniworx.de/haskell/memcached-binary.git + git: https://gitea.uniworx.systems/haskell/memcached-binary.git - completed: commit: cbea6159c2975d42f948525e03e12fc390da53c5 - git: https://gitlab.uniworx.de/haskell/conduit-resumablesink.git + git: https://gitea.uniworx.systems/haskell/conduit-resumablesink.git name: conduit-resumablesink pantry-tree: sha256: 0cccf4684bbd84f81d2d3d53dd81c46cb103b5322f1d8e89e9b222211281e1b7 @@ -36,7 +36,7 @@ packages: version: '0.3' original: commit: cbea6159c2975d42f948525e03e12fc390da53c5 - git: https://gitlab.uniworx.de/haskell/conduit-resumablesink.git + git: https://gitea.uniworx.systems/haskell/conduit-resumablesink.git - completed: commit: 5aa1f3b009253b02c4822005ac59ee208a10a347 git: https://github.com/jtdaugherty/HaskellNet.git @@ -50,7 +50,7 @@ packages: git: https://github.com/jtdaugherty/HaskellNet.git - completed: commit: 40393c938111ac78232dc2c7eec5edb4a22d03e8 - git: https://gitlab.uniworx.de/haskell/HaskellNet-SSL.git + git: https://gitea.uniworx.systems/haskell/HaskellNet-SSL.git name: HaskellNet-SSL pantry-tree: sha256: 95dcec22fdb8af986e59f0f60aa76d4a48f34a546dca799bd571e1d183f773e0 @@ -58,10 +58,10 @@ packages: version: 0.3.4.1 original: commit: 40393c938111ac78232dc2c7eec5edb4a22d03e8 - git: https://gitlab.uniworx.de/haskell/HaskellNet-SSL.git + git: https://gitea.uniworx.systems/haskell/HaskellNet-SSL.git - completed: commit: 01afaf599ba6f8a9d804c269e91d3190b249d3f0 - git: https://gitlab.uniworx.de/haskell/ldap-client.git + git: https://gitea.uniworx.systems/haskell/ldap-client.git name: ldap-client pantry-tree: sha256: 3fa8f102427b437b2baaec15cf884e88b47a1621b1c3fd4d8919f0263fde8656 @@ -69,10 +69,10 @@ packages: version: 0.4.0 original: commit: 01afaf599ba6f8a9d804c269e91d3190b249d3f0 - git: https://gitlab.uniworx.de/haskell/ldap-client.git + git: https://gitea.uniworx.systems/haskell/ldap-client.git - completed: commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 - git: https://gitlab.uniworx.de/haskell/serversession.git + git: https://gitea.uniworx.systems/haskell/serversession.git name: serversession pantry-tree: sha256: 83ac78a987399db3da62f84bbd335fead11aadebd57251d0688127fca984db23 @@ -81,11 +81,11 @@ packages: version: 1.0.2 original: commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 - git: https://gitlab.uniworx.de/haskell/serversession.git + git: https://gitea.uniworx.systems/haskell/serversession.git subdir: serversession - completed: commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 - git: https://gitlab.uniworx.de/haskell/serversession.git + git: https://gitea.uniworx.systems/haskell/serversession.git name: serversession-backend-acid-state pantry-tree: sha256: 4804260c6245c12e1728c78dd33bf16e95b7f2b69b38b6900a4e65b1ef3e04b7 @@ -94,11 +94,11 @@ packages: version: 1.0.4 original: commit: fda3a000f9039e35e76e28f8e88c4942fac9fd69 - git: https://gitlab.uniworx.de/haskell/serversession.git + git: https://gitea.uniworx.systems/haskell/serversession.git subdir: serversession-backend-acid-state - completed: commit: dc928c3a456074b8777603bea20e81937321777f - git: https://gitlab.uniworx.de/haskell/xss-sanitize.git + git: https://gitea.uniworx.systems/haskell/xss-sanitize.git name: xss-sanitize pantry-tree: sha256: f567a1c834448daaa164f2029fad164e6c8df2d4c92b51f811bae19cc0c95975 @@ -106,10 +106,10 @@ packages: version: 0.3.6 original: commit: dc928c3a456074b8777603bea20e81937321777f - git: https://gitlab.uniworx.de/haskell/xss-sanitize.git + git: https://gitea.uniworx.systems/haskell/xss-sanitize.git - completed: commit: f8170266ab25b533576e96715bedffc5aa4f19fa - git: https://gitlab.uniworx.de/haskell/colonnade.git + git: https://gitea.uniworx.systems/haskell/colonnade.git name: colonnade pantry-tree: sha256: 392393652cc0f354d351482557b9385c8e6122e706359b030373656565f2e045 @@ -118,11 +118,11 @@ packages: version: 1.2.0.2 original: commit: f8170266ab25b533576e96715bedffc5aa4f19fa - git: https://gitlab.uniworx.de/haskell/colonnade.git + git: https://gitea.uniworx.systems/haskell/colonnade.git subdir: colonnade - completed: commit: 42103ab247057c04c8ce7a83d9d4c160713a3df1 - git: https://gitlab.uniworx.de/haskell/minio-hs.git + git: https://gitea.uniworx.systems/haskell/minio-hs.git name: minio-hs pantry-tree: sha256: c5faff15fa22a7a63f45cd903c9bd11ae03f422c26f24750f5c44cb4d0db70fc @@ -130,10 +130,10 @@ packages: version: 1.5.2 original: commit: 42103ab247057c04c8ce7a83d9d4c160713a3df1 - git: https://gitlab.uniworx.de/haskell/minio-hs.git + git: https://gitea.uniworx.systems/haskell/minio-hs.git - completed: commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitlab.uniworx.de/haskell/cryptoids.git + git: https://gitea.uniworx.systems/haskell/cryptoids.git name: cryptoids-class pantry-tree: sha256: 30466648d273ffb1d580b7961188d67a0bedb3703d6d5f8cca3c15a45295f203 @@ -142,11 +142,11 @@ packages: version: 0.0.0 original: commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitlab.uniworx.de/haskell/cryptoids.git + git: https://gitea.uniworx.systems/haskell/cryptoids.git subdir: cryptoids-class - completed: commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitlab.uniworx.de/haskell/cryptoids.git + git: https://gitea.uniworx.systems/haskell/cryptoids.git name: cryptoids-types pantry-tree: sha256: 824ac5c55c2ad553bd401bb5a99731bbdccc828ecc5d71f174e9375c4e03c46e @@ -155,11 +155,11 @@ packages: version: 1.0.0 original: commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitlab.uniworx.de/haskell/cryptoids.git + git: https://gitea.uniworx.systems/haskell/cryptoids.git subdir: cryptoids-types - completed: commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitlab.uniworx.de/haskell/cryptoids.git + git: https://gitea.uniworx.systems/haskell/cryptoids.git name: cryptoids pantry-tree: sha256: b1f49dde76ff7e78b76e7f2f3b3f76c55e5e61555d1df5415ad3b6eb80dda2cb @@ -168,11 +168,11 @@ packages: version: 0.5.1.0 original: commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitlab.uniworx.de/haskell/cryptoids.git + git: https://gitea.uniworx.systems/haskell/cryptoids.git subdir: cryptoids - completed: commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitlab.uniworx.de/haskell/cryptoids.git + git: https://gitea.uniworx.systems/haskell/cryptoids.git name: filepath-crypto pantry-tree: sha256: 9c31a2ffb2b1c86f9ba34eb83529c7a5a7dc68a49f89813c9b553427474654d9 @@ -181,11 +181,11 @@ packages: version: 0.1.0.0 original: commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitlab.uniworx.de/haskell/cryptoids.git + git: https://gitea.uniworx.systems/haskell/cryptoids.git subdir: filepath-crypto - completed: commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitlab.uniworx.de/haskell/cryptoids.git + git: https://gitea.uniworx.systems/haskell/cryptoids.git name: uuid-crypto pantry-tree: sha256: 852e59807df1f2cf4b5a3748c46fa149d15a78651c93addfe5fc31d2d94c47f4 @@ -194,7 +194,7 @@ packages: version: 1.4.0.0 original: commit: 130b0dcbf2b09ccdf387b50262f1efbbbf1819e3 - git: https://gitlab.uniworx.de/haskell/cryptoids.git + git: https://gitea.uniworx.systems/haskell/cryptoids.git subdir: uuid-crypto - completed: commit: f216e3c0a1efa11a62fd4c9c2db38f7e2b7ac72d @@ -224,7 +224,7 @@ packages: subdir: fastcdc - completed: commit: 843683d024f767de236f74d24a3348f69181a720 - git: https://gitlab.uniworx.de/haskell/zip-stream.git + git: https://gitea.uniworx.systems/haskell/zip-stream.git name: zip-stream pantry-tree: sha256: 0da8bc38d73034962d2e2d1a7586b6dee848a629319fce9cbbf578348c61118c @@ -232,10 +232,10 @@ packages: version: 0.2.0.1 original: commit: 843683d024f767de236f74d24a3348f69181a720 - git: https://gitlab.uniworx.de/haskell/zip-stream.git + git: https://gitea.uniworx.systems/haskell/zip-stream.git - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-core pantry-tree: sha256: 08c8da10b32c8d9f784238fd87232bf90b752e82f81ef2c52c62210f9aadda9a @@ -244,11 +244,11 @@ packages: version: 1.6.20.2 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-core - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-static pantry-tree: sha256: 32c1608243a5309005ce11e2aa379ac1d6f8c380c529785eb510770118f3da06 @@ -257,11 +257,11 @@ packages: version: 1.6.1.0 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-static - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-persistent pantry-tree: sha256: 3778ef2964e1a3890afc22cc9124eacb40e64b62bed4983a85d3b99897f54c5c @@ -270,11 +270,11 @@ packages: version: 1.6.0.7 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-persistent - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-newsfeed pantry-tree: sha256: 53ebad62655863a657dcf749ffd3de46f6af90dd71f55bc4d50805ac48ddb099 @@ -283,11 +283,11 @@ packages: version: 1.7.0.0 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-newsfeed - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-form pantry-tree: sha256: 260b7f16a8e1d58da137eb91aeed3a11ccbe59ba3e614457a635b9dc3e71426f @@ -296,11 +296,11 @@ packages: version: 1.7.0 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-form - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-form-multi pantry-tree: sha256: b21fc50db43733dfe6e285345856610ba4feb83329e9cf953bf8047ba18ecbd6 @@ -309,11 +309,11 @@ packages: version: 1.7.0.2 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-form-multi - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-auth pantry-tree: sha256: d335b940a207f8155f421b7146746a72d20db6ad54412154f2c829a59bf21e08 @@ -322,11 +322,11 @@ packages: version: 1.6.10.3 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-auth - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-auth-oauth pantry-tree: sha256: 39d2f7d5d1abb3a2953858c5f23880e60ecfcdad0549ddc2570204f9c47649f4 @@ -335,11 +335,11 @@ packages: version: 1.6.0.3 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-auth-oauth - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-sitemap pantry-tree: sha256: 971f48af7011ff7816872d067e5de9cadafdd371bdf209170b77df36001abd27 @@ -348,11 +348,11 @@ packages: version: 1.6.0 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-sitemap - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-test pantry-tree: sha256: 3d5022e8e3f8e77abcf075c42cf49efaa26f4951159bbb5ab50b69fdfeacb7c1 @@ -361,11 +361,11 @@ packages: version: 1.6.12 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-test - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-bin pantry-tree: sha256: 422d7816965b79826c6c24582d76dadbacd1bfb3e9a8f31208867cd788f2a5b8 @@ -374,11 +374,11 @@ packages: version: 1.6.1 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-bin - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod pantry-tree: sha256: cb53ef3f2036185d2b4752d6fbc5d78470b4504e646e7eb4dd2397f2599daf42 @@ -387,11 +387,11 @@ packages: version: 1.6.1.1 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-eventsource pantry-tree: sha256: 6d393201852cd024e377159ba836398e24d191563e08165430113d3c1384aff2 @@ -400,11 +400,11 @@ packages: version: 1.6.0.1 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-eventsource - completed: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git name: yesod-websockets pantry-tree: sha256: 02df6117e9b74a77879ea750130ba2d8ad8d3c99e14ca678320cb578984301e5 @@ -413,11 +413,11 @@ packages: version: 0.3.0.3 original: commit: aa671eb41fdad360f2f7cb844f8de03479efe3f7 - git: https://gitlab.uniworx.de/haskell/yesod.git + git: https://gitea.uniworx.systems/haskell/yesod.git subdir: yesod-websockets - completed: commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f - git: https://gitlab.uniworx.de/haskell/cryptonite.git + git: https://gitea.uniworx.systems/haskell/cryptonite.git name: cryptonite pantry-tree: sha256: 19e49259fa5e3c257495d72b3c7c3c49537aeafd508c780c2430ddca2ef71a91 @@ -425,10 +425,10 @@ packages: version: '0.29' original: commit: 71a630edaf5f22c464e24fac8d9d310f4055ea1f - git: https://gitlab.uniworx.de/haskell/cryptonite.git + git: https://gitea.uniworx.systems/haskell/cryptonite.git - completed: commit: e18dd125c5ea26fa4e88bed079b61d8c1365ee37 - git: https://gitlab.uniworx.de/haskell/esqueleto.git + git: https://gitea.uniworx.systems/haskell/esqueleto.git name: esqueleto pantry-tree: sha256: 8a93dc98eb4529ff64aa5bcdaa3c00dcdf0378033ad675864e2b0fc3d869d947 @@ -436,7 +436,7 @@ packages: version: 3.5.4.0 original: commit: e18dd125c5ea26fa4e88bed079b61d8c1365ee37 - git: https://gitlab.uniworx.de/haskell/esqueleto.git + git: https://gitea.uniworx.systems/haskell/esqueleto.git - completed: hackage: classy-prelude-yesod-1.5.0@sha256:8f7e183bdfd6d2ea9674284c4f285294ab086aff60d9be4e5d7d2f3c1a2b05b7,1330 pantry-tree: From d0f4704c15bb8ed16bf4fb167e8544aada7861ea Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Sep 2024 04:40:24 +0200 Subject: [PATCH 55/58] build(docker/backend): improve dir handling --- docker/backend/Dockerfile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index bc2ee5299..088d60bd2 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -10,19 +10,20 @@ ENV LANG=en_US.UTF-8 # in CI-pipelines these two should be different, so that the container caches the compilation results. ARG MOUNT_DIR=/mnt/fradrive ARG PROJECT_DIR=/fradrive -RUN mkdir -p ${PROJECT_DIR} -RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r ${MOUNT_DIR}/* ${PROJECT_DIR} ; fi -WORKDIR ${PROJECT_DIR} -ENV HOME=${PROJECT_DIR} -RUN mkdir -p /.stack -ENV STACK_ROOT=/.stack +RUN mkdir -p "${PROJECT_DIR}" +RUN if [ "${PROJECT_DIR}" != "${MOUNT_DIR}" ] ; then cp -r "${MOUNT_DIR}"/* "${PROJECT_DIR}" ; fi +WORKDIR "${PROJECT_DIR}" +ENV HOME="${PROJECT_DIR}" + +RUN mkdir -p "${PROJECT_DIR}/.stack" +ENV STACK_ROOT="${PROJECT_DIR}/.stack" RUN make .stack STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true RUN stack build yesod-bin ENV FRADRIVE_MAKE_TARGET=serve-backend -ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT=${STACK_ROOT} IN_CONTAINER=true +ENTRYPOINT make -- ${FRADRIVE_MAKE_TARGET} STACK_ROOT="${STACK_ROOT}" IN_CONTAINER=true EXPOSE 3000/tcp EXPOSE 3443/tcp \ No newline at end of file From 052c361f1dfaed6100ced9ba87ef2d3d69dbc92b Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Fri, 20 Sep 2024 16:25:10 +0200 Subject: [PATCH 56/58] build(Makefile): tweak .stack dep caching logic --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 93352e4b7..ad825a05e 100644 --- a/Makefile +++ b/Makefile @@ -178,7 +178,7 @@ serve-backend: # TODO: maybe deprecated .PHONY: database -database: .stack .stack-work.lock compile-backend-prod +database: .stack compile-backend-prod export SERVER_SESSION_ACID_FALLBACK=$${SERVER_SESSION_ACID_FALLBACK:-true} export AVSPASS=$${AVSPASS:-nopasswordset} stack exec uniworxdb -- $(db) @@ -192,15 +192,17 @@ database-%: @echo "This target, intended to fill, clear, migrate, ... the database using uniworxdb from inside the backend container is yet to be implemented" exit 1 -.PHONY: .stack +# .PHONY: .stack .stack: stack.yaml stack.yaml.lock .stack: $(MAKE) -- --image-run---.stack +.PHONY: --.stack --.stack: stack.yaml stack.yaml.lock stack build --fast --only-dependencies $(stackopts) -.stack-work.lock: - [ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en .stack-work.lock "$0" "$@" || : +# TODO: deprecated, remove +# .stack-work.lock: +# [ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en .stack-work.lock "$0" "$@" || : ##### BACKEND TARGETS ##### ########################### From 20552032de4cb83782c8acc4d1979c169091c5ab Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 22 Sep 2024 02:37:38 +0200 Subject: [PATCH 57/58] build(docker): allow backend container to connect to database container --- Makefile | 2 +- config/settings.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ad825a05e..2d87f724d 100644 --- a/Makefile +++ b/Makefile @@ -214,7 +214,7 @@ database-%: .PHONY: --containerized-database --containerized-database: FRADRIVE_SERVICE=database # port forwarding is disabled in --network=host mode; nevertheless it is stated here for documentation reasons ---containerized-database: CONTAINER_PORTS=-p 127.0.0.1:5432:5432/tcp +--containerized-database: CONTAINER_PORTS=-p 5432:5432/tcp --containerized-database: --image-build if [ "$(IN_CONTAINER)" == "false" ] ; then \ $(CONTAINER_COMMAND) run -it $(CONTAINER_PORTS) --name fradrive.$(FRADRIVE_SERVICE).$$(date +'%Y-%m-%dT%H-%M-%S') fradrive/$(FRADRIVE_SERVICE) ; \ diff --git a/config/settings.yml b/config/settings.yml index 602c9c0e2..f9a1ae1d8 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -123,7 +123,7 @@ auth-pw-hash: database: user: "_env:PGUSER:uniworx" password: "_env:PGPASS:uniworx" - host: "_env:PGHOST:127.0.0.1" + host: "_env:PGHOST:host.docker.internal" port: "_env:PGPORT:5432" # See config/test-settings.yml for an override during tests database: "_env:PGDATABASE:uniworx" From 599649fb2566da9ddef030e7db5dce3cdc928653 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Sun, 22 Sep 2024 02:37:55 +0200 Subject: [PATCH 58/58] build(docker/database): fix postgres FROM url --- docker/database/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/database/Dockerfile b/docker/database/Dockerfile index 204c3029d..d486280bf 100644 --- a/docker/database/Dockerfile +++ b/docker/database/Dockerfile @@ -1,4 +1,4 @@ -FROM postgres:12 +FROM docker.io/postgres:12 # Allow for connecting to database without password authentication ENV POSTGRES_HOST_AUTH_METHOD=trust