diff --git a/INSTALL-APP.md b/INSTALL-APP.md index 5d2b4cc..b3f27e8 100644 --- a/INSTALL-APP.md +++ b/INSTALL-APP.md @@ -1,38 +1,17 @@ ## ElabFTW Installation Instructions -### Some Command Line Work -The installation migth take a while so be patient. The last message in the log should be something like this: - -`[services.d] done.` - -Once installed we have to do some command line work to initilize elabftw and make it comaptible with HTTP instead of HTTPS. -Log into our bibbox server (e.g. via ssh) and execute the following commands: - -* Import the database structure: - * `docker exec -it -web bin/install start` -* Disable secrue cookies (Incompatible with HTTP): - * `docker exec -it -web sed -i 's/session.cookie_secure = true/session.cookie_secure = false/' ../etc/php8/php.ini` -* Set the app url in database (including the http://): - * `docker exec -it -mysql mysql -u elabftw --database="elabftw" --password="" --execute='UPDATE config SET conf_value = "http://:80" WHERE conf_name = "url";'` - -### Restart ElabFTW - -Restart the app via the restart button in the BIBBOX dashboard: - -![Screenshot01](assets/install-screen-01.png) - ### Start ElabFTW You will get to the login sceen: -![Screenshot01](assets/install-screen-02.png) +![Screenshot01](assets/install-screen-01.png) #### Register The first user you register will automatically be the admin user: -![Screenshot01](assets/install-screen-03.png) +![Screenshot01](assets/install-screen-02.png) #### Make all further configuration steps within the ELabFTW app. @@ -40,7 +19,7 @@ The first user you register will automatically be the admin user: Now you can login with your new admin account. Further information can be found here https://www.elabftw.net/ and https://doc.elabftw.net/. -![Screenshot04](assets/install-screen-04.png) +![Screenshot04](assets/install-screen-03.png) ## After the installation Have a nice ride with the Admins youngtimer. diff --git a/assets/install-screen-01.png b/assets/install-screen-01.png index b19425f..cc47375 100644 Binary files a/assets/install-screen-01.png and b/assets/install-screen-01.png differ diff --git a/assets/install-screen-02.png b/assets/install-screen-02.png index cc47375..8fdb790 100644 Binary files a/assets/install-screen-02.png and b/assets/install-screen-02.png differ diff --git a/assets/install-screen-03.png b/assets/install-screen-03.png index 8fdb790..9411314 100644 Binary files a/assets/install-screen-03.png and b/assets/install-screen-03.png differ diff --git a/assets/install-screen-04.png b/assets/install-screen-04.png deleted file mode 100644 index 9411314..0000000 Binary files a/assets/install-screen-04.png and /dev/null differ diff --git a/data/new_run.sh b/data/new_run.sh new file mode 100755 index 0000000..47930a2 --- /dev/null +++ b/data/new_run.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +echo "INFO: Start /run.sh..." >&2 +bash /run.sh & + +sleep 1 +#while ! ps | grep -q "nginx 0:00 {php-fpm8} php-fpm: pool elabpool$" - +while ! nc -z $DB_HOST $DB_PORT 2>/dev/null +do +echo "INFO: Waiting for DATABASE..." >&2 +sleep 2 +done + +echo "INFO: Importing the database structure..." >&2 +# Import the database structure: +bin/install start + +#Disable secrue cookies (Incompatible with HTTP): +if grep -Fxq "session.cookie_secure = true" /etc/php8/php.ini +then +echo "INFO: Disable secrue cookies">&2 + +sed -i 's/session.cookie_secure = true/session.cookie_secure = false/' /etc/php8/php.ini + +echo "INFO: Restart php-fpm8">&2 +pkill php-fpm8 + +fi + +tail -f /dev/null diff --git a/docker-compose.yml b/docker-compose.yml index 2298dce..ba7330a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -19,6 +19,7 @@ services: # Disable HTTPS check on login - ./data/login.php:/elabftw/web/login.php - ./data/init.inc.php:/elabftw/web/app/init.inc.php + - ./data/new_run.sh:/elabftw/new_run.sh # drop some capabilities not needed by the app cap_drop: - SYS_ADMIN @@ -43,7 +44,8 @@ services: ports: - '8080:443' - + command: /elabftw/new_run.sh + bibbox-mysql: container_name: bibbox-mysql command: --default-authentication-plugin=mysql_native_password diff --git a/docker-compose.yml.template b/docker-compose.yml.template index c8e783d..3e1e597 100644 --- a/docker-compose.yml.template +++ b/docker-compose.yml.template @@ -19,6 +19,8 @@ services: # Disable HTTPS check on login - ./data/login.php:/elabftw/web/login.php - ./data/init.inc.php:/elabftw/web/app/init.inc.php + - ./data/new_run.sh:/elabftw/new_run.sh + # drop some capabilities not needed by the app cap_drop: - SYS_ADMIN @@ -43,6 +45,7 @@ services: ports: - '8443:443' + command: /elabftw/new_run.sh proxy: TYPE: PRIMARY URLPREFIX: §§INSTANCE diff --git a/fileinfo.json b/fileinfo.json index acdaebd..344f094 100644 --- a/fileinfo.json +++ b/fileinfo.json @@ -2,6 +2,6 @@ "environment_replace": {}, "script_replace": [], "permissions": { - + "data/new_run.sh": 755 } }