summaryrefslogtreecommitdiffstats
path: root/docker/filebin_starter.sh
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2020-09-20 14:57:29 +0200
committerFlorian Pritz <bluewind@xinu.at>2020-09-20 15:02:30 +0200
commitab41e7717fe0df20a4ca516b918b64bd32753361 (patch)
tree95cc0a33ef9d6d63cdb3317aab2aae1742a2c24d /docker/filebin_starter.sh
parent80577e948a210e60e6738bf6ea3b0b391ab07b48 (diff)
docker: Always regenerated config files on container startup
We should really regenerate the configs, run migrations and hooks during each container startup. Otherwise you really can't update anything at all. The only thing that we do not do multiple times is adding the admin user, but the add_user method already checks for that and simply displayed an error. Hiding that error is probably not worth the effort so we just add a quick explanatory comment before the potential error. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'docker/filebin_starter.sh')
-rwxr-xr-xdocker/filebin_starter.sh25
1 files changed, 10 insertions, 15 deletions
diff --git a/docker/filebin_starter.sh b/docker/filebin_starter.sh
index 2fecc3fe3..38088537e 100755
--- a/docker/filebin_starter.sh
+++ b/docker/filebin_starter.sh
@@ -64,25 +64,20 @@ while ! nc "$FB_DB_HOSTNAME" 3306 </dev/null >/dev/null; do
sleep 0.5
done
+set_config
+set_database_config
+set_mail_config
-if [[ ! -e $FILEBIN_DIR/application/config/config-local.php ]]; then
- echo "no config found, new config will be generated"
+CONTACT_INFO_FILE=${FILEBIN_DIR}/data/local/contact-info.php
+cp $FILEBIN_DIR/data/local/examples/contact-info.php ${CONTACT_INFO_FILE}
- set_config
- set_database_config
- set_mail_config
+sed -i "s/John Doe/${FB_CONTACT_NAME}/" ${CONTACT_INFO_FILE}
+sed -i "s/john.doe@example.com/${FB_CONTACT_MAIL}/" ${CONTACT_INFO_FILE}
- CONTACT_INFO_FILE=${FILEBIN_DIR}/data/local/contact-info.php
- cp $FILEBIN_DIR/data/local/examples/contact-info.php ${CONTACT_INFO_FILE}
+${FILEBIN_DIR}/scripts/install-git-hooks.sh
+${FILEBIN_DIR}/git-hooks/post-merge
- sed -i "s/John Doe/${FB_CONTACT_NAME}/" ${CONTACT_INFO_FILE}
- sed -i "s/john.doe@example.com/${FB_CONTACT_MAIL}/" ${CONTACT_INFO_FILE}
-
- ${FILEBIN_DIR}/scripts/install-git-hooks.sh
- ${FILEBIN_DIR}/git-hooks/post-merge
-
- ${FILEBIN_HOME_DIR}/add_user.sh
-fi
+${FILEBIN_HOME_DIR}/add_user.sh
cd $FILEBIN_DIR/public_html
php -S 0.0.0.0:8080