From 8200afa024bf920738acc1a714670190db7e28fc Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Wed, 14 Sep 2022 18:27:13 +0200 Subject: [PATCH] new: [gogocarto] upgrade code to version ``3.4.10`` Signed-off-by: Valentin Lab --- gogocarto/README.org | 28 ++++++++++++++----- .../hooks/mongo_database-relation-joined | 19 +++++++++++-- gogocarto/lib/common | 14 ++++++++-- 3 files changed, 50 insertions(+), 11 deletions(-) diff --git a/gogocarto/README.org b/gogocarto/README.org index 96e51b3..063a9c3 100644 --- a/gogocarto/README.org +++ b/gogocarto/README.org @@ -27,16 +27,18 @@ https://gitlab.adullact.net/pixelhumain/GoGoCarto docker_tree_hash=$(git rev-parse HEAD:docker) ## Intermediate docker image is cached on docker.0k.io if needed if ! docker pull docker.0k.io/gogocarto-builder:${docker_tree_hash}; then - make build && - docker tag docker_gogocarto docker.0k.io/gogocarto-builder:${docker_tree_hash} && + make docker-build && + docker tag gogocarto_gogocarto:latest docker.0k.io/gogocarto-builder:${docker_tree_hash} && docker push docker.0k.io/gogocarto-builder:${docker_tree_hash} else - docker tag docker.0k.io/gogocarto-builder:${docker_tree_hash} docker_gogocarto + docker tag docker.0k.io/gogocarto-builder:${docker_tree_hash} gogocarto_gogocarto:latest fi make up && -docker-compose -f docker/docker-compose.yml exec gogocarto make init +docker-compose exec gogocarto make init #+end_src +Last =make init= is building the actual code to be served. + ** Full release is cached on =docker.0k.io/downloads= This is the content of the source tree, once populated by =make init=. @@ -80,13 +82,25 @@ sed -ri "s/^(<\?php)/\1\n\ini_set('memory.limit', '1024M');/" \ web/index.php bin/console sed -ri "s%dirname\(__DIR__\)\.'%'/opt/apps/gogocarto%g" \ web/index.php -sed -ri "s/gogocarto_default/'%env(MONGODB_DATABASE)%_default'/g" \ +sed -ri "s/\"use_as_saas=%env\(resolve:USE_AS_SAAS\)%\/%env\(resolve:DATABASE_NAME\)%\"/'%env(resolve:DATABASE_NAME)%'/g" \ config/packages/doctrine_mongodb.yaml + +## Add missing tags in git +git log --format="%H" -- config/parameters.yaml | + while read h; do + printf "%s\t%s\n" "$h" "$(git show $h:config/parameters.yaml | + grep version | + cut -f 2 -d ":" | + xargs echo)" + done | uniq -f 1 | + while read a b; do + git tag "$b" "$a" 2>/dev/null + done commit_sha=$(git describe HEAD --tags) tar cjv \ - bin web vendor config src templates translations \ - --exclude=.git --exclude=.gitignore \ + --exclude=.git --exclude=.gitignore --exclude=.github \ --owner=root --group=root \ + bin web vendor config src templates translations \ > gogocarto-${commit_sha}.tar.bz2 #+end_src diff --git a/gogocarto/hooks/mongo_database-relation-joined b/gogocarto/hooks/mongo_database-relation-joined index 899c842..6f7707a 100755 --- a/gogocarto/hooks/mongo_database-relation-joined +++ b/gogocarto/hooks/mongo_database-relation-joined @@ -28,13 +28,28 @@ DATABASE_NAME=$DBNAME EOF +touch "$initing" +trap_add EXIT,ERR "rm -v \"$initing\"" + if [ -e "$inited" ]; then + { + ## This is required for migrating to 3.4.10 correctly + compose --debug mongosh "$SERVICE_NAME" < vich upload ### USE_AS_SAAS=false +USE_AS_SAAS_PRIVATE=false CONTACT_EMAIL=contact@localhost.fr INSTANCE_NAME=GoGoCarto @@ -89,6 +91,7 @@ INSTANCE_NAME=GoGoCarto # Delivery is disabled by default via "null://localhost" MAILER_URL=gmail://test.gogocarto:creerdescartesagogo@localhost FROM_EMAIL=test.gogocarto@gmail.com +MAX_EMAIL_PER_HOUR=70 ###< symfony/swiftmailer-bundle ### ###> hwi/oauth-bundle ### @@ -105,6 +108,13 @@ OAUTH_FACEBOOK_SECRET=disabled # exple: SENTRY_DSN=https://6145d1aac36c429781fc1b0f79b0da48@sentry.io/1402018 SENTRY_DSN= ###< sentry/sentry-symfony ### + +###> Matomo integration - see docs/matomo.md ### +MATOMO_URL= +MATOMO_SITE_ID= +MATOMO_USER_TOKEN= +###< Matomo ### + EOF }