1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mautic_ynh.git synced 2024-09-03 19:36:26 +02:00

Merge pull request #5 from YunoHost-Apps/testing

Testing
This commit is contained in:
Éric Gaspar 2021-06-11 15:24:50 +02:00 committed by GitHub
commit 47688c4905
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 128 additions and 176 deletions

4
issue_template.md → .github/ISSUE_TEMPLATE.md vendored Executable file → Normal file
View file

@ -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:*

16
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View file

@ -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)

View file

@ -1,3 +1,8 @@
<!--
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
It shall NOT be edited by hand.
-->
# 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)
@ -10,54 +15,30 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
## 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

View file

@ -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)*
*[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.*
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

View file

@ -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"

View file

@ -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

View file

@ -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;
}

4
doc/DISCLAIMER.md Normal file
View file

@ -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`.

4
doc/DISCLAIMER_fr.md Normal file
View file

@ -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`.

View file

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

View file

@ -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": [

View file

@ -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!"*

View file

@ -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
"

View file

@ -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"
# #=================================================

View file

@ -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"

View file

@ -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
#=================================================