Browse Source

fix: [gogocarto] properly set the database name in mongodb

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
matomo 1.5.3
Valentin Lab 4 years ago
parent
commit
1b7d2c16eb
  1. 2
      gogocarto/README.org
  2. 3
      gogocarto/hooks/mongo_database-relation-joined

2
gogocarto/README.org

@ -80,6 +80,8 @@ sed -ri "s/^(<\?php)/\1\n\ini_set('memory.limit', '1024M');/" \
web/index.php bin/console web/index.php bin/console
sed -ri "s%dirname\(__DIR__\)\.'%'/opt/apps/gogocarto%g" \ sed -ri "s%dirname\(__DIR__\)\.'%'/opt/apps/gogocarto%g" \
web/index.php web/index.php
sed -ri "s/gogocarto_default/'%env(MONGODB_DATABASE)%_default'/g" \
config/packages/doctrine_mongodb.yaml
commit_sha=$(git describe HEAD --tags) commit_sha=$(git describe HEAD --tags)
tar cjv \ tar cjv \
bin web vendor config src templates translations \ bin web vendor config src templates translations \

3
gogocarto/hooks/mongo_database-relation-joined

@ -14,13 +14,14 @@ fi
inited="${GOGOCARTO_CODE}"/.inited-${DBNAME} inited="${GOGOCARTO_CODE}"/.inited-${DBNAME}
MONGO_URL=mongodb://${TARGET_SERVICE_NAME}:27017/${DBNAME}
MONGO_URL=mongodb://${TARGET_SERVICE_NAME}:27017
cat <<EOF >> ${GOGOCARTO_CODE}/.env cat <<EOF >> ${GOGOCARTO_CODE}/.env
###> doctrine/mongodb-odm-bundle ### ###> doctrine/mongodb-odm-bundle ###
MONGODB_URL=$MONGO_URL MONGODB_URL=$MONGO_URL
MONGODB_DATABASE=$DBNAME
###< doctrine/mongodb-odm-bundle ### ###< doctrine/mongodb-odm-bundle ###
EOF EOF

Loading…
Cancel
Save