1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/prestashop_ynh.git synced 2024-09-03 20:06:39 +02:00

Merge branch 'master' into pr/20

This commit is contained in:
yalh76 2022-06-26 16:27:49 +02:00
commit ffc92b03e3
8 changed files with 52 additions and 77 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Prestashop for YunoHost # Prestashop for YunoHost
[![Integration level](https://dash.yunohost.org/integration/prestashop.svg)](https://dash.yunohost.org/appci/app/prestashop) ![](https://ci-apps.yunohost.org/ci/badges/prestashop.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/prestashop.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/prestashop.svg)](https://dash.yunohost.org/appci/app/prestashop) ![Working status](https://ci-apps.yunohost.org/ci/badges/prestashop.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/prestashop.maintain.svg)
[![Install Prestashop with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=prestashop) [![Install Prestashop with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=prestashop)
*[Lire ce readme en français.](./README_fr.md)* *[Lire ce readme en français.](./README_fr.md)*
@ -17,13 +17,13 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
PrestaShop is an Open Source e-commerce web application, committed to providing the best shopping cart experience for both merchants and customers. It is written in PHP, is highly customizable, supports all the major payment services, is translated in many languages and localized for many countries, has a fully responsive design (both front and back office), etc. PrestaShop is an Open Source e-commerce web application, committed to providing the best shopping cart experience for both merchants and customers. It is written in PHP, is highly customizable, supports all the major payment services, is translated in many languages and localized for many countries, has a fully responsive design (both front and back office), etc.
**Shipped version:** 1.7.8.5~ynh1 **Shipped version:** 1.7.8.6~ynh1
**Demo:** https://demo.prestashop.com/#/en/front **Demo:** https://demo.prestashop.com/#/en/front
## Screenshots ## Screenshots
![](./doc/screenshots/screenshot.png) ![Screenshot of Prestashop](./doc/screenshots/screenshot.png)
## Disclaimers / important information ## Disclaimers / important information
@ -35,21 +35,22 @@ PrestaShop is an Open Source e-commerce web application, committed to providing
There is a documentation page dedicated to the post-installation process: http://doc.prestashop.com/display/PS17/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation There is a documentation page dedicated to the post-installation process: http://doc.prestashop.com/display/PS17/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation
## Documentation and resources ## Documentation and resources
* Official app website: https://prestashop.com * Official app website: <https://prestashop.com>
* Official user documentation: https://doc.prestashop.com/display/PS17/Guide+de+l'utilisateur * Official user documentation: <https://doc.prestashop.com/display/PS17/Guide+de+l'utilisateur>
* Upstream app code repository: https://github.com/PrestaShop/PrestaShop * Upstream app code repository: <https://github.com/PrestaShop/PrestaShop>
* YunoHost documentation for this app: https://yunohost.org/app_prestashop * YunoHost documentation for this app: <https://yunohost.org/app_prestashop>
* Report a bug: https://github.com/YunoHost-Apps/prestashop_ynh/issues * Report a bug: <https://github.com/YunoHost-Apps/prestashop_ynh/issues>
## Developer info ## Developer info
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing). Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing).
To try the testing branch, please proceed like that. To try the testing branch, please proceed like that.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing --debug
or or
sudo yunohost app upgrade prestashop -u https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing --debug sudo yunohost app upgrade prestashop -u https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing --debug
``` ```
**More info regarding app packaging:** https://yunohost.org/packaging_apps **More info regarding app packaging:** <https://yunohost.org/packaging_apps>

View file

@ -1,10 +1,14 @@
<!--
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.
-->
# Prestashop pour YunoHost # Prestashop pour YunoHost
[![Niveau d'intégration](https://dash.yunohost.org/integration/prestashop.svg)](https://dash.yunohost.org/appci/app/prestashop) ![](https://ci-apps.yunohost.org/ci/badges/prestashop.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/prestashop.maintain.svg) [![Niveau d'intégration](https://dash.yunohost.org/integration/prestashop.svg)](https://dash.yunohost.org/appci/app/prestashop) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/prestashop.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/prestashop.maintain.svg)
[![Installer Prestashop avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=prestashop) [![Installer Prestashop avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=prestashop)
*[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 Prestashop rapidement et simplement sur un serveur YunoHost. > *Ce package vous permet d'installer Prestashop 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.* Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
@ -13,13 +17,13 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
PrestaShop is an Open Source e-commerce web application, committed to providing the best shopping cart experience for both merchants and customers. It is written in PHP, is highly customizable, supports all the major payment services, is translated in many languages and localized for many countries, has a fully responsive design (both front and back office), etc. PrestaShop is an Open Source e-commerce web application, committed to providing the best shopping cart experience for both merchants and customers. It is written in PHP, is highly customizable, supports all the major payment services, is translated in many languages and localized for many countries, has a fully responsive design (both front and back office), etc.
**Version incluse :** 1.7.8.5~ynh1 **Version incluse :** 1.7.8.6~ynh1
**Démo :** https://demo.prestashop.com/#/en/front **Démo :** https://demo.prestashop.com/#/en/front
## Captures d'écran ## Captures d'écran
![](./doc/screenshots/screenshot.png) ![Capture d'écran de Prestashop](./doc/screenshots/screenshot.png)
## Avertissements / informations importantes ## Avertissements / informations importantes
@ -31,21 +35,22 @@ PrestaShop is an Open Source e-commerce web application, committed to providing
There is a documentation page dedicated to the post-installation process: http://doc.prestashop.com/display/PS17/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation There is a documentation page dedicated to the post-installation process: http://doc.prestashop.com/display/PS17/Installing+PrestaShop#InstallingPrestaShop-Completingtheinstallation
## Documentations et ressources ## Documentations et ressources
* Site officiel de l'app : https://prestashop.com * Site officiel de l'app : <https://prestashop.com>
* Documentation officielle utilisateur : https://doc.prestashop.com/display/PS17/Guide+de+l'utilisateur * Documentation officielle utilisateur : <https://doc.prestashop.com/display/PS17/Guide+de+l'utilisateur>
* Dépôt de code officiel de l'app : https://github.com/PrestaShop/PrestaShop * Dépôt de code officiel de l'app : <https://github.com/PrestaShop/PrestaShop>
* Documentation YunoHost pour cette app : https://yunohost.org/app_prestashop * Documentation YunoHost pour cette app : <https://yunohost.org/app_prestashop>
* Signaler un bug : https://github.com/YunoHost-Apps/prestashop_ynh/issues * Signaler un bug : <https://github.com/YunoHost-Apps/prestashop_ynh/issues>
## Informations pour les développeurs ## Informations pour les développeurs
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing). Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing).
Pour essayer la branche testing, procédez comme suit. Pour essayer la branche testing, procédez comme suit.
```
``` bash
sudo yunohost app install https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing --debug sudo yunohost app install https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing --debug
ou ou
sudo yunohost app upgrade prestashop -u https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing --debug sudo yunohost app upgrade prestashop -u https://github.com/YunoHost-Apps/prestashop_ynh/tree/testing --debug
``` ```
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps **Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/PrestaShop/PrestaShop/releases/download/1.7.8.5/prestashop_1.7.8.5.zip SOURCE_URL=https://github.com/PrestaShop/PrestaShop/releases/download/1.7.8.6/prestashop_1.7.8.6.zip
SOURCE_SUM=b90e7200eb759a4904a8e819de23e012ba173d93d33a4a87d3df0f30717aee60 SOURCE_SUM=3d84c258990cbbe76eda57829e847c5023930925223f49b578739244c660db06
SOURCE_SUM_PRG=sha256sum SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=false SOURCE_IN_SUBDIR=false

View file

@ -8,7 +8,7 @@ location __PATH__/ {
index index.php; index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file
#client_max_body_size 50M; client_max_body_size 300M;
try_files $uri $uri/ index.php; try_files $uri $uri/ index.php;
location ~ [^/]\.php(/|$) { location ~ [^/]\.php(/|$) {

View file

@ -6,7 +6,7 @@
"en": "Create a E-commerce Website", "en": "Create a E-commerce Website",
"fr": "Créer un site ecommerce" "fr": "Créer un site ecommerce"
}, },
"version": "1.7.8.5~ynh1", "version": "1.7.8.6~ynh1",
"url": "https://www.prestashop.com/", "url": "https://www.prestashop.com/",
"upstream": { "upstream": {
"license": "OSL-3.0", "license": "OSL-3.0",
@ -33,7 +33,7 @@
"multi_instance": true, "multi_instance": true,
"services": [ "services": [
"nginx", "nginx",
"php7.3-fpm", "php8.0-fpm",
"mysql" "mysql"
], ],
"arguments": { "arguments": {
@ -48,6 +48,10 @@
"example": "/prestashop", "example": "/prestashop",
"default": "/prestashop" "default": "/prestashop"
}, },
{
"name": "admin",
"type": "user"
},
{ {
"name": "is_public", "name": "is_public",
"type": "boolean", "type": "boolean",

View file

@ -6,7 +6,7 @@
phpversion=$YNH_PHP_VERSION phpversion=$YNH_PHP_VERSION
pkg_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-xmlrpc php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-zip" pkg_dependencies="php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-fpm php${YNH_PHP_VERSION}-common php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-xmlrpc php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-zip"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS

View file

@ -15,7 +15,6 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_clean_setup () { ynh_clean_setup () {
#### Remove this function if there's nothing to clean before calling the remove script.
true true
} }
# Exit if an error occurs during the execution of the script # Exit if an error occurs during the execution of the script
@ -45,13 +44,6 @@ test ! -d $final_path \
#================================================= #=================================================
# STANDARD RESTORATION STEPS # STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RECREATE THE DEDICATED USER # RECREATE THE DEDICATED USER
#================================================= #=================================================
@ -67,23 +59,10 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
ynh_restore_file --origin_path="$final_path" ynh_restore_file --origin_path="$final_path"
# FIXME: this should be managed by the core in the future
# Here, as a packager, you may have to tweak the ownerhsip/permissions
# such that the appropriate users (e.g. maybe www-data) can access
# files in some cases.
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
# this will be treated as a security issue.
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$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"
#================================================= #=================================================
# SPECIFIC RESTORATION # SPECIFIC RESTORATION
#================================================= #=================================================
@ -94,6 +73,20 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1
# Define and install dependencies # Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies ynh_install_app_dependencies $pkg_dependencies
#=================================================
# 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"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
# RESTORE THE MYSQL DATABASE # RESTORE THE MYSQL DATABASE
#================================================= #=================================================

View file

@ -26,13 +26,8 @@ phpversion=$YNH_PHP_VERSION
#================================================= #=================================================
# CHECK VERSION # CHECK VERSION
#================================================= #=================================================
ynh_script_progression --message="Checking version..."
### This helper will compare the version of the currently installed app and the version of the upstream package.
### $upgrade_type can have 2 different values
### - UPGRADE_APP if the upstream app version has changed
### - UPGRADE_PACKAGE if only the YunoHost package has changed
### ynh_check_app_version_changed will stop the upgrade if the app is up to date.
### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do.
upgrade_type=$(ynh_check_app_version_changed) upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
@ -56,15 +51,6 @@ ynh_abort_if_errors
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
#
# N.B. : the followings setting migrations snippets are provided as *EXAMPLES*
# of what you may want to do in some cases (e.g. a setting was not defined on
# some legacy installs and you therefore want to initiaze stuff during upgrade)
#
### If nobody installed your app before 4.1,
### then you may safely remove these lines
# Cleaning legacy permissions # Cleaning legacy permissions
if ynh_legacy_permissions_exists; then if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all ynh_legacy_permissions_delete_all
@ -92,24 +78,10 @@ then
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/img $final_path/override" ynh_setup_source --dest_dir="$final_path" --keep="$final_path/img $final_path/override"
fi fi
# FIXME: this should be managed by the core in the future
# Here, as a packager, you may have to tweak the ownerhsip/permissions
# such that the appropriate users (e.g. maybe www-data) can access
# files in some cases.
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
# this will be treated as a security issue.
chmod 750 "$final_path" chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# UPGRADE DEPENDENCIES # UPGRADE DEPENDENCIES
#================================================= #=================================================