diff --git a/issue_template.md b/.github/ISSUE_TEMPLATE.md old mode 100755 new mode 100644 similarity index 94% rename from issue_template.md rename to .github/ISSUE_TEMPLATE.md index b755f2a..2729a6b --- a/issue_template.md +++ b/.github/ISSUE_TEMPLATE.md @@ -8,7 +8,7 @@ about: When creating a bug report, please use the following template to provide 1. *Read this whole template first.* 2. *Determine if you are on the right place:* - *If you were performing an action on the app from the webadmin or the CLI (install, update, backup, restore, change_url...), you are on the right place!* - - *Otherwise, the issue may be due to Mautic itself. Refer to its documentation or repository for help.* + - *Otherwise, the issue may be due to the app itself. Refer to its documentation or repository for help.* - *When in doubt, post here and we will figure it out together.* 3. *Delete the italic comments as you write over them below, and remove this guide.* --- @@ -31,7 +31,7 @@ about: When creating a bug report, please use the following template to provide - *If you performed a command from the CLI, the command itself is enough. For example:* ```sh - sudo yunohost app install mautic + sudo yunohost app install the_app ``` - *If you used the webadmin, please perform the equivalent command from the CLI first.* - *If the error occurs in your browser, explain what you did:* diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..ef70e18 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ +## Problem + +- *Description of why you made this PR* + +## Solution + +- *And how do you fix that problem* + +## PR Status + +- [ ] Code finished and ready to be reviewed/tested +- [ ] The fix/enhancement were manually tested (if applicable) + +## Automatic tests + +Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ *after creating the PR*, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization) diff --git a/README.md b/README.md index ddf4cc5..050e31e 100755 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + + # Mautic for YunoHost [![Integration level](https://dash.yunohost.org/integration/mautic.svg)](https://dash.yunohost.org/appci/app/mautic) ![](https://ci-apps.yunohost.org/ci/badges/mautic.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mautic.maintain.svg) @@ -5,59 +10,35 @@ *[Lire ce readme en français.](./README_fr.md)* -> *This package allows you to install Mautic quickly and simply on a YunoHost server. +> *This package allows you to install Mautic quickly and simply on a YunoHost server. If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* ## Overview -**Shipped version:** 3.3.2 +Open Source Marketing Automation Software. + +**Shipped version:** 4.0.0~ynh1 + +**Demo:** https://www.mautic.org/demo ## Screenshots -![](mautic-Screenshots.jpg) +![](./doc/screenshots/mautic-Screenshots.jpg) -## Demo - - * [Demo](https://www.mautic.org/demo) +## Disclaimers / important information ## Configuration * After installation you will receive an email with the DB password. * To login to Mautic `https://example.com/mautic/s/login`. -## Documentation +## Documentation and resources - * Documentation: https://docs.mautic.org/en - * YunoHost documentation: If specific documentation is needed, feel free to contribute. - -## YunoHost specific features - -#### Multi-user support - - * Are LDAP and HTTP auth supported? - * Can the app be used by multiple users? - -#### Supported architectures - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mautic.svg)](https://ci-apps.yunohost.org/ci/apps/mautic/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mautic.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mautic/) - -## Limitations - -* Any known limitations. - -## Additional information - -* Other info you would like to add about this app. - -## Links - - * Report a bug: https://github.com/YunoHost-Apps/mautic_ynh/issues - * App website: https://www.mautic.org/ - * Upstream app repository: https://github.com/mautic/mautic - * YunoHost website: https://yunohost.org/ - ---- +* Official app website: https://www.mautic.org/ +* Official admin documentation: https://docs.mautic.org/en +* Upstream app code repository: https://github.com/mautic/mautic +* YunoHost documentation for this app: https://yunohost.org/app_mautic +* Report a bug: https://github.com/YunoHost-Apps/mautic_ynh/issues ## Developer info @@ -69,3 +50,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/mautic_ynh/tree/testi or sudo yunohost app upgrade mautic -u https://github.com/YunoHost-Apps/mautic_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index 74de485..edd94ca 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,63 +1,40 @@ # Mautic pour YunoHost [![Niveau d'intégration](https://dash.yunohost.org/integration/mautic.svg)](https://dash.yunohost.org/appci/app/mautic) ![](https://ci-apps.yunohost.org/ci/badges/mautic.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/mautic.maintain.svg) -[![Installer mautic avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mautic) +[![Installer Mautic avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=mautic) -*[Read this readme in english.](./README.md)* +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer Mautic rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* +> *Ce package vous permet d'installer Mautic rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble -**Version incluse :** 3.3.2 +Logiciel d'automatisation marketing open source. + +**Version incluse :** 4.0.0~ynh1 + +**Démo :** https://www.mautic.org/demo ## Captures d'écran -![](mautic-Screenshots.jpg) +![](./doc/screenshots/mautic-Screenshots.jpg) -## Démo - - * [Démo](https://www.mautic.org/demo) +## Avertissements / informations importantes ## Configuration * Après l'installation, vous recevrez un e-mail avec le mot de passe DB. * Pour se connecter à Mautic `https://example.com/mautic/s/login`. -## Documentation +## Documentations et ressources - * Documentation : https://docs.mautic.org/en - * Documentation YunoHost : Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. - -## Caractéristiques spécifiques YunoHost - -#### Support multi-utilisateur - -* L'authentification LDAP et HTTP est-elle prise en charge ? -* L'application peut-elle être utilisée par plusieurs utilisateurs ? - -#### Architectures supportées - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/mautic.svg)](https://ci-apps.yunohost.org/ci/apps/mautic/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/mautic.svg)](https://ci-apps-arm.yunohost.org/ci/apps/mautic/) - -## Limitations - -* Limitations connues. - -## Informations additionnelles - -* Autres informations que vous souhaitez ajouter sur cette application. - -## Liens - - * Signaler un bug : https://github.com/YunoHost-Apps/mautic_ynh/issues - * Site de l'application : https://www.mautic.org/ - * Dépôt de l'application principale : https://github.com/mautic/mautic - * Site web YunoHost : https://yunohost.org/ - ---- +* Site officiel de l'app : https://www.mautic.org/ +* Documentation officielle de l'admin : https://docs.mautic.org/en +* Dépôt de code officiel de l'app : https://github.com/mautic/mautic +* Documentation YunoHost pour cette app : https://yunohost.org/app_mautic +* Signaler un bug : https://github.com/YunoHost-Apps/mautic_ynh/issues ## Informations pour les développeurs @@ -69,3 +46,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/mautic_ynh/tree/testi ou sudo yunohost app upgrade mautic -u https://github.com/YunoHost-Apps/mautic_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/check_process b/check_process index e61bbff..a594a7a 100755 --- a/check_process +++ b/check_process @@ -1,6 +1,3 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - ;; Test complet ; Manifest domain="domain.tld" diff --git a/conf/app.src b/conf/app.src index 5402c4d..bdb180b 100755 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://github.com/mautic/mautic/releases/download/3.3.2/3.3.2.zip -SOURCE_SUM=58666c42b8fbe0284c7e4cf80228abb05448cfe8932bda2d7e9d64c6d65a1fe8 +SOURCE_URL=https://github.com/mautic/mautic/releases/download/4.0.0-beta/4.0.0-beta.zip +SOURCE_SUM=aae03f6e283f5bf64024256eb7b7a81d2df84e4be4f12d5aaa76cc491d0e0e7f SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=3.3.2.zip +SOURCE_FILENAME=4.0.0-beta.zip diff --git a/conf/nginx.conf b/conf/nginx.conf index fb1fe8d..53b74ad 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -43,7 +43,7 @@ location __PATH__/ { expires off; gzip off; default_type "image/gif"; - add_header 'Access-Control-Allow-Origin' *; + more_set_headers "Access-Control-Allow-Origin: *"; try_files $uri /index.php?$args; } diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..cc17aad --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,4 @@ +## Configuration + + * After installation you will receive an email with the DB password. + * To login to Mautic `https://example.com/mautic/s/login`. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md new file mode 100644 index 0000000..a1c2e9d --- /dev/null +++ b/doc/DISCLAIMER_fr.md @@ -0,0 +1,4 @@ +## Configuration + + * Après l'installation, vous recevrez un e-mail avec le mot de passe DB. + * Pour se connecter à Mautic `https://example.com/mautic/s/login`. diff --git a/mautic-Screenshots.jpg b/doc/screenshots/mautic-Screenshots.jpg similarity index 100% rename from mautic-Screenshots.jpg rename to doc/screenshots/mautic-Screenshots.jpg diff --git a/manifest.json b/manifest.json index 51ff3a6..92064f7 100755 --- a/manifest.json +++ b/manifest.json @@ -6,15 +6,22 @@ "en": "Open Source Marketing Automation Software.", "fr": "Logiciel d'automatisation marketing open source." }, - "version": "3.3.2~ynh1", + "version": "4.0.0~ynh1", "url": "https://www.mautic.org/", + "upstream": { + "license": "GPL-3.0-only", + "website": "https://www.mautic.org/", + "demo": "https://www.mautic.org/demo", + "admindoc": "https://docs.mautic.org/en", + "code": "https://github.com/mautic/mautic" + }, "license": "GPL-3.0-only", "maintainer": { "name": "", "email": "" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": true, "services": [ diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100755 index 6c28fc5..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,16 +0,0 @@ -## Problem -- *Description of why you made this PR* - -## Solution -- *And how do you fix that problem* - -## PR Status -- [ ] Code finished. -- [ ] Tested with Package_check. -- [ ] Fix or enhancement tested. -- [ ] Upgrade from last version tested. -- [ ] Can be reviewed and tested. - -## Package_check results ---- -* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/_common.sh b/scripts/_common.sh index 4bb3c75..582711d 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,7 +4,7 @@ # COMMON VARIABLES #================================================= -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="7.4" extra_php_dependencies="php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xmlrpc php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-zip " diff --git a/scripts/install b/scripts/install index 64121d4..2ba770c 100755 --- a/scripts/install +++ b/scripts/install @@ -45,6 +45,14 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=1 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # CREATE A MYSQL DATABASE #================================================= @@ -63,7 +71,15 @@ ynh_script_progression --message="Setting up source files..." --weight=2 ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" -#cp -r ../sources $final_path + +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + +chmod -R g+w $final_path/app/config/ +chmod -R g+w $final_path/media/files/ +chmod -R g+w $final_path/media/images/ +chmod -R g+w $final_path/translations/ #================================================= # NGINX CONFIGURATION @@ -73,14 +89,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -90,28 +98,12 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1 ynh_add_fpm_config --package="$extra_php_dependencies" phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chown -R $app:www-data $final_path -#chmod -R g+w $final_path/app/cache/ -#chmod -R g+w $final_path/app/logs/ -chmod -R g+w $final_path/app/config/ -chmod -R g+w $final_path/media/files/ -chmod -R g+w $final_path/media/images/ -chmod -R g+w $final_path/translations/ - #================================================= # SETUP A CRON #================================================= ynh_script_progression --message="Setuping a cron..." ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" - chmod 644 "/etc/cron.d/$app" # #================================================= diff --git a/scripts/restore b/scripts/restore index 573deb0..e44498e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -52,6 +52,14 @@ test ! -d $final_path \ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# RECREATE THE DEDICATED USER +#================================================= +ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 + +# Create the dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # RESTORE THE APP MAIN DIR #================================================= @@ -59,30 +67,14 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$final_path" -#================================================= -# RECREATE THE DEDICATED USER -#================================================= -ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 - -# Create the dedicated user (if not existing) -ynh_system_user_create --username=$app - -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Set permissions to app files -chown -R $app:www-data $final_path -#chmod -R g+w $final_path/app/cache/ -#chmod -R g+w $final_path/app/logs/ -chmod -R g+w $final_path/app/config/ -chmod -R g+w $final_path/media/files/ -chmod -R g+w $final_path/media/images/ -chmod -R g+w $final_path/translations/ +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1 ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" @@ -98,6 +90,7 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./ #================================================= # RESTORE VARIOUS FILES #================================================= +ynh_script_progression --message="Restoring various files..." --weight=1 ynh_restore_file --origin_path="/etc/cron.d/$app" diff --git a/scripts/upgrade b/scripts/upgrade index b699702..31bbd8e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,6 +65,14 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=1 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -77,6 +85,15 @@ then ynh_setup_source --dest_dir="$final_path" fi +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + +chmod -R g+w $final_path/app/config/ +chmod -R g+w $final_path/media/files/ +chmod -R g+w $final_path/media/images/ +chmod -R g+w $final_path/translations/ + #================================================= # NGINX CONFIGURATION #================================================= @@ -85,14 +102,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 - -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app - #================================================= # PHP-FPM CONFIGURATION #================================================= @@ -101,22 +110,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -# Set permissions to app files -chown -R $app:www-data $final_path -#chmod -R g+w $final_path/app/cache/ -#chmod -R g+w $final_path/app/logs/ -chmod -R g+w $final_path/app/config/ -chmod -R g+w $final_path/media/files/ -chmod -R g+w $final_path/media/images/ -chmod -R g+w $final_path/translations/ - - #================================================= # RELOAD NGINX #=================================================