File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -276,6 +276,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
276276
277277## Versions
278278
279+ * ** 16.01.23:** - Wrap ` .env ` values in quotes.
279280* ** 05.01.23:** - Fix db password setting (sed escape ` & ` ).
280281* ** 21.12.22:** - Update db info in .env file when env vars are updated.
281282* ** 10.10.22:** - Remove password escape logic which caused problems for a small subset of users.
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ app_setup_block: |
104104
105105# changelog
106106changelogs :
107+ - { date: "16.01.23:", desc: "Wrap `.env` values in quotes." }
107108 - { date: "05.01.23:", desc: "Fix db password setting (sed escape `&`)." }
108109 - { date: "21.12.22:", desc: "Update db info in .env file when env vars are updated." }
109110 - { date: "10.10.22:", desc: "Remove password escape logic which caused problems for a small subset of users." }
Original file line number Diff line number Diff line change @@ -85,15 +85,15 @@ if [[ -n "${DB_HOST}" ]]; then
8585
8686 if ! grep -xqE "^[#]?DB_PORT=.*" /config/www/.env; then
8787 # add DB_PORT line to /config/www/.env because current /app/www/.env.example doesn't have it
88- sed -i -E "/^[#]?DB_HOST=.*/a DB_PORT=${DB_PORT}" /config/www/.env
89- echo "**** Insert DB_PORT=${DB_PORT} into /config/www/.env ****"
88+ sed -i -E "/^[#]?DB_HOST=.*/a DB_PORT=' ${DB_PORT}' " /config/www/.env
89+ echo "**** Insert DB_PORT=' ${DB_PORT}' into /config/www/.env ****"
9090 fi
9191
92- sed -i -E "s/^[#]?DB_HOST=.*/DB_HOST=${DB_HOST}/g" /config/www/.env
93- sed -i -E "s/^[#]?DB_PORT=.*/DB_PORT=${DB_PORT}/g" /config/www/.env
94- sed -i -E "s/^[#]?DB_DATABASE=.*/DB_DATABASE=${DB_DATABASE}/g" /config/www/.env
95- sed -i -E "s/^[#]?DB_USERNAME=.*/DB_USERNAME=${DB_USER}/g" /config/www/.env
96- sed -i -E "s/^[#]?DB_PASSWORD=.*/DB_PASSWORD=${DB_PASS//&/\\&}/g" /config/www/.env
92+ sed -i -E "s/^[#]?DB_HOST=.*/DB_HOST=' ${DB_HOST}' /g" /config/www/.env
93+ sed -i -E "s/^[#]?DB_PORT=.*/DB_PORT=' ${DB_PORT}' /g" /config/www/.env
94+ sed -i -E "s/^[#]?DB_DATABASE=.*/DB_DATABASE=' ${DB_DATABASE}' /g" /config/www/.env
95+ sed -i -E "s/^[#]?DB_USERNAME=.*/DB_USERNAME=' ${DB_USER}' /g" /config/www/.env
96+ sed -i -E "s/^[#]?DB_PASSWORD=.*/DB_PASSWORD=' ${DB_PASS//&/\\&}' /g" /config/www/.env
9797fi
9898
9999# set appurl
You can’t perform that action at this time.
0 commit comments