diff --git a/check_process b/check_process index 4bd08b6..1dacf58 100644 --- a/check_process +++ b/check_process @@ -4,8 +4,8 @@ path="/path" admin="john" language="fr" - is_public=1 - password="1Strong-Password" + is_public=1 + password="1Strong-Password" ; Checks pkg_linter=1 setup_sub_dir=0 diff --git a/conf/default.env b/conf/default.env index 0533c99..2b177fa 100644 --- a/conf/default.env +++ b/conf/default.env @@ -1,21 +1,30 @@ -APP_NAME="Invoice Ninja" APP_ENV=production +APP_DEBUG=true +APP_NAME="Invoice Ninja" +APP_URL=https://__DOMAIN__ APP_KEY=__APP_KEY__ +APP_CIPHER=AES-256-CBC +APP_LOCALE=__LANGUAGE__ -APP_DEBUG=false EXPANDED_LOGGING=false -APP_URL=https://__DOMAIN____PATH__ - DB_CONNECTION=mysql -MULTI_DB_ENABLED=false - +DB_STRICT=false DB_HOST=localhost DB_DATABASE=__DB_NAME__ DB_USERNAME=__DB_NAME__ DB_PASSWORD=__DB_PWD__ DB_PORT=3306 +MAIL_MAILER=smtp +MAIL_HOST=localhost +MAIL_PORT=25 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null +MAIL_FROM_ADDRESS='__EMAIL__' +MAIL_FROM_NAME="__EMAIL_FIRSTNAME__ __EMAIL_LASTNAME__" + DEMO_MODE=false BROADCAST_DRIVER=log @@ -24,25 +33,16 @@ CACHE_DRIVER=file SESSION_DRIVER=file SESSION_LIFETIME=120 -REDIS_HOST=127.0.0.1 -REDIS_PASSWORD=null -REDIS_PORT=6379 +#REDIS_HOST=127.0.0.1 +#REDIS_PASSWORD=null +#REDIS_PORT=6379 -MAIL_MAILER=smtp -MAIL_HOST=smtp.__DOMAIN__ -MAIL_PORT=25 -MAIL_USERNAME=null -MAIL_PASSWORD=null -MAIL_ENCRYPTION=tls -MAIL_FROM_ADDRESS='__EMAIL__' -MAIL_FROM_NAME="__EMAIL_FIRSTNAME__ __EMAIL_LASTNAME__" - -POSTMARK_API_TOKEN= +#POSTMARK_API_TOKEN= REQUIRE_HTTPS=false GOOGLE_MAPS_API_KEY= ERROR_EMAIL= -TRUSTED_PROXIES= +TRUSTED_PROXIES=* NINJA_ENVIRONMENT=selfhost diff --git a/conf/systemd.service b/conf/systemd.service deleted file mode 100644 index d4d89d2..0000000 --- a/conf/systemd.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=InvoiceNinja: Create and email invoices -After=network.target - -[Service] -Type=simple -User=__APP__ -Group=__APP__ -WorkingDirectory=__FINALPATH__ -ExecStart=__FINALPATH__/script >> /var/log/__APP__/__APP__.log 2>&1 - -[Install] -WantedBy=multi-user.target diff --git a/manifest.json b/manifest.json index d153d0c..2e76fc6 100644 --- a/manifest.json +++ b/manifest.json @@ -15,7 +15,7 @@ "userdoc": "https://invoiceninja.github.io/", "code": "https://github.com/invoiceninja/invoiceninja" }, - "license": "AAL", + "license": "ELv2", "maintainer": { "name": "Sebastian Gumprich", "email": "yunohost AT gumpri DOT ch" @@ -53,9 +53,13 @@ "name": "is_public", "type": "boolean", "default": true, - "help": { - "en": "Since your clients should have the possibility to access your invoices, the app is public. If you only want to send invoices via mail (or not at all), deactivate public access" - } + "help": { + "en": "Since your clients should have the possibility to access your invoices, the app is public. If you only want to send invoices via mail (or not at all), deactivate public access" + } + }, + { + "name": "password", + "type": "password" } ] } diff --git a/scripts/install b/scripts/install index 69e0409..e95210a 100755 --- a/scripts/install +++ b/scripts/install @@ -25,6 +25,7 @@ path_url="/" admin=$YNH_APP_ARG_ADMIN language=$YNH_APP_ARG_LANGUAGE is_public=$YNH_APP_ARG_IS_PUBLIC +password=$YNH_APP_ARG_PASSWORD app=$YNH_APP_INSTANCE_NAME @@ -128,21 +129,14 @@ ynh_script_progression --message="Modifying a config file..." ynh_add_config --template="default.env" --destination="$final_path/.env" # generate app key and save it as a environment variable -pushd "$final_path" - app_key="`php$phpversion artisan key:generate --show`" -popd -ynh_app_setting_set --app=$app --key=app_key --value=$app_key +# pushd "$final_path" +# app_key="`php$phpversion artisan key:generate --show`" +# popd +# ynh_app_setting_set --app=$app --key=app_key --value=$app_key chmod 400 "$final_path/.env" chown $app:$app "$final_path/.env" -#================================================= -# STORE THE CHECKSUM OF THE CONFIG FILE -#================================================= - -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$final_path/.env" - #================================================= # BUILD THE APPLICATION #================================================= @@ -151,7 +145,7 @@ ynh_script_progression --message="Building the application..." pushd "$final_path" # Run the database migrations and initially fill the db php$phpversion artisan migrate:fresh --seed --no-interaction --verbose --force - php$phpversion artisan ninja:create-account --email $email --password changeme --no-interaction --verbose + php$phpversion artisan ninja:create-account --email $email --password $password --no-interaction --verbose php$phpversion artisan optimize --no-interaction --verbose php$phpversion artisan view:clear php$phpversion artisan cache:clear diff --git a/scripts/remove b/scripts/remove index 563f4eb..b43b1a7 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,7 +17,6 @@ ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) -port=$(ynh_app_setting_get --app=$app --key=port) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name final_path=$(ynh_app_setting_get --app=$app --key=final_path) diff --git a/scripts/restore b/scripts/restore index 2028b66..2e379db 100755 --- a/scripts/restore +++ b/scripts/restore @@ -28,7 +28,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -language=$(ynh_app_setting_get --app=$app --key=language) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)