summaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/add_user.sh1
-rwxr-xr-xdocker/filebin_starter.sh25
2 files changed, 11 insertions, 15 deletions
diff --git a/docker/add_user.sh b/docker/add_user.sh
index 4342528ef..88618746d 100755
--- a/docker/add_user.sh
+++ b/docker/add_user.sh
@@ -1,4 +1,5 @@
#!/bin/bash
cd ${FILEBIN_DIR}
+echo "Creating initial user. If it exists, this will show an error message instead"
printf "%s\n%s\n%s\n" admin ${FB_CONTACT_MAIL} admin | php index.php user add_user
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