UPDATED README

This commit is contained in:
Jeroen De Meerleer 2022-09-05 16:13:31 +02:00
parent 92ce356af7
commit c039004d62
Signed by: JeroenED
GPG Key ID: 28CCCB8F62BFADD6
2 changed files with 18 additions and 10 deletions

View File

@ -8,17 +8,18 @@ Webcron management is an easy-to-use interface to manage cronjobs running on a p
## Deploying ## Deploying
### Requirements for web-server ### Requirements for web-server
* php <= 8.0 * php <= 8.1
* ext-openssl * ext-openssl
* ext-intl
* ext-pcntl (highly recommended) * ext-pcntl (highly recommended)
* MySQL/MariaDB * MariaDB
* Ability to change the webroot directory * Ability to change the webroot directory
* Ability to run a script as daemon (eg. supervisor or systemd units) * Ability to run a script as daemon (eg. supervisor or systemd units)
### Requirements for build-server ### Requirements for build-server
* php <= 8.0 (incl composer <= 2) * php <= 8.1 (incl composer <= 2)
* NodeJS <= 14.0 (incl. npm <= 7) * NodeJS <= 16.0 (incl. npm <= 8)
### Building ### Building
Please run following command on the build server Please run following command on the build server

View File

@ -16,8 +16,9 @@
#/ #/
## Dependencies ## Dependencies
php=8.0 php=8.1
npm=7.0 npm=8.0
node=16.0
## Globals ## Globals
script_name=$(basename "${0}") script_name=$(basename "${0}")
@ -28,8 +29,11 @@ environment=main
root=/tmp/webcron root=/tmp/webcron
APP_ENV="prod" APP_ENV="prod"
DATABASE_URL="mysql://root:letmein@127.0.0.1:3306/webcron"
APP_SECRET=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 20 ; echo '') APP_SECRET=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 20 ; echo '')
DATABASE_URL="mysql://root:letmein@127.0.0.1:3306/webcron"
DEMO_MODE="false"
DEMO_USER="example@example.com"
DEMO_PASS="password"
ENCRYPTION_METHOD="AES-256-CBC" ENCRYPTION_METHOD="AES-256-CBC"
HASHING_METHOD="sha256" HASHING_METHOD="sha256"
DEBUG=false DEBUG=false
@ -95,11 +99,11 @@ CheckDeps() {
CheckDep "PHP" "php --version" "PHP is not available. Exiting" "FAIL" ${php} "echo '<?php echo phpversion();' | php" "PHP version too low. Exiting" "FAIL" CheckDep "PHP" "php --version" "PHP is not available. Exiting" "FAIL" ${php} "echo '<?php echo phpversion();' | php" "PHP version too low. Exiting" "FAIL"
CheckDep "Composer" "composer --version" "Composer is not available. Exiting" "FAIL" CheckDep "Composer" "composer --version" "Composer is not available. Exiting" "FAIL"
CheckDep "MySQL" "/usr/sbin/mysqld --version" "MySQL is not available. SQLite can be used" "WARNING" CheckDep "MySQL" "/usr/sbin/mysqld --version" "MySQL is not available. SQLite can be used" "WARNING"
CheckDep "NodeJS" "node --version" "NodeJS is not available. Exiting" "FAIL" CheckDep "NodeJS" "node --version" "NodeJS is not available. Exiting" "FAIL" ${node} "node --version" "Node version too low. Exiting" "FAIL"
CheckDep "NPM" "npm --version" "NPM is not available. Exiting" "FAIL" ${npm} "npm --version" "NPM version too low. Exiting" "FAIL" CheckDep "NPM" "npm --version" "NPM is not available. Exiting" "FAIL" ${npm} "npm --version" "NPM version too low. Exiting" "FAIL"
CheckDep "php-pcntl" "php -me | grep pcntl" "php-pcntl extension is not available. Cronjobs will not be running asyncronous" "WARNING" CheckDep "php-pcntl" "php -me | grep pcntl" "php-pcntl extension is not available. Cronjobs will not be running asyncronous" "WARNING"
CheckDep "php-intl" "php -me | grep intl" "php-intl extension is not available. Exiting" "FAIL" CheckDep "php-intl" "php -me | grep intl" "php-intl extension is not available. Exiting" "FAIL"
CheckDep "php-xml" "php -me | grep xml" "php-xml extension is not available. Exiting" "FAIL" CheckDep "php-openssl" "php -me | grep openssl" "php-openssl extension is not available. Exiting" "FAIL"
echo -e "\e[1;32mDependency test OK\e[0m" echo -e "\e[1;32mDependency test OK\e[0m"
} }
@ -146,8 +150,11 @@ CreateEnvFile() {
touch .env 1> /dev/null 2>&1 touch .env 1> /dev/null 2>&1
fi fi
echo "APP_ENV=\"$APP_ENV\"" >> .env echo "APP_ENV=\"$APP_ENV\"" >> .env
echo "DATABASE_URL=\"$DATABASE_URL\"" >> .env
echo "APP_SECRET=\"$APP_SECRET\"" >> .env echo "APP_SECRET=\"$APP_SECRET\"" >> .env
echo "DATABASE_URL=\"$DATABASE_URL\"" >> .env
echo "DEMO_MODE=\"$DEMO_MODE\"" >> .env
echo "DEMO_USER=\"$DEMO_USER\"" >> .env
echo "DEMO_PASS=\"$DEMO_PASS\"" >> .env
echo "ENCRYPTION_METHOD=\"$ENCRYPTION_METHOD\"" >> .env echo "ENCRYPTION_METHOD=\"$ENCRYPTION_METHOD\"" >> .env
echo "HASHING_METHOD=\"$HASHING_METHOD\"" >> .env echo "HASHING_METHOD=\"$HASHING_METHOD\"" >> .env
echo "DEBUG=\"$DEBUG\"" >> .env echo "DEBUG=\"$DEBUG\"" >> .env