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

49 commits

Author SHA1 Message Date
Éric Gaspar
07941ce975 cleaning 2024-03-09 11:00:54 +01:00
Alexandre Aubin
0a3097ef9e
Fix upgrade, we don't need that "email" variable which can't be defined if $admin doesnt exists 2023-09-14 10:54:39 +02:00
eric_G
08e8dd7ab7
Packaging format v2 (#406)
* backup script for PostgreSQL (#376)

Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup

* Adapt to PostgreSQL (#375)

Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires)

* config.json for PostgreSQL (#374)

Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server

* Install with PostgreSQL (#373)

I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install

* install postgresql

* Reordering

* reset config file

* Update _common.sh

* Update config.json

* Fix

* Migration (#382)

* add migration

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Fix

* Fix

* Fix

* Update install

* Update upgrade

* Fix

* Update install

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update install

* Fix

* Fix

* Fix

* Update upgrade

* Cleaning up

* Update upgrade

* Update _common.sh

* Update check_process

* Update _common.sh

* Fix

* Update mysql-to-pg.conf

* Update upgrade

* Update systemd.service

* Cleaning

* Update _common.sh

* Fix

* Update upgrade

* Update _common.sh

* Update upgrade

* Update backup

* Fix

* Fix

* Update upgrade

* Update upgrade

* Update systemd.service

* Update _common.sh

* Revert "Update _common.sh"

This reverts commit d880150af9.

* Cleaning

* Fix

* Update check_process

* Fix

* Update _common.sh

* Fix

* Update _common.sh

* Fix

* Update manifest.json

* Update install

* Update _common.sh

* Update upgrade

* Fix

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Auto-update README

* Update _common.sh

* Upgrade to v7.4.0

* Auto-update README

* Upgrade to v7.5.2

* Auto-update README

* Update config.json

* [fix] mariadb to postgres migration

* Auto-update README

* [fix] Update manifest requirements

* Update manifest.json

* Update config.json

* upgrade config to upstream

* Fix linter

* Update _common.sh

* v2

* Fix

* Auto-update README

* Fix

* Auto-update README

* Update upgrade

* Fix

* Cleaning

* add apt

* Auto-update README

* cleaning

* fix data path var

* fix

* Auto-update README

* Update backup

* add more apt

* Update manifest.toml

* Update tests.toml

* Fix

* Update _common.sh

* Update upgrade

* Update restore

* Update remove

* cleaning

* Update install

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update manifest.toml

* 7.7.1

* Update manifest.json

* Auto-update README

* Update config.json

* Auto-update README

* cleaning

* Auto-update README

* Update ADMIN.md

* Update ADMIN_fr.md

* fix

* Delete check_process

* 7.8.1

* Auto-update README

* Auto-update README

* Update manifest.toml

* Auto-update README

* fix migration from 7.3.0

* Update manifest.toml

* fix migration from 7.3.0

* cleaning

* Update manifest.toml

* src

* Update upgrade

* Update upgrade

* Update tests.toml

* remove src

* 7.9.1

* Auto-update README

* Update config.json

* Update doc/DESCRIPTION.md

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* Auto-update README

* Update tests.toml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* Update manifest.toml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* Update manifest.toml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* Update upgrade

* Update install

* Update DESCRIPTION_fr.md

* Auto-update README

* Update _common.sh

* Update manifest.toml

* Update manifest.toml

* Auto-update README

* Update manifest.toml

* Update upgrade

* Update manifest.toml

* Auto-update README

* cleaning

* Auto-update README

* Update nginx.conf

* Update manifest.toml

* Auto-update README

* cleaning

* Update doc/ADMIN.md

Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>

* Update doc/ADMIN_fr.md

Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>

* 8.0.0

* Auto-update README

* Update manifest.toml

* Auto-update README

* 8.1.0

* Auto-update README

* Update upgrade

* Update tests.toml

* Update tests.toml

* Update _common.sh

* Update manifest.toml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* Update manifest.toml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* Update manifest.toml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* Update tests.toml

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* Update manifest.toml

* DEBUG: see if other migrations pass (#430)

* Update manifest.toml

* Auto-update README

* Revert "DEBUG: see if other migrations pass (#430)"

This reverts commit 8532bd3ba2.

* Update tests.toml

* scripts: fix MySQL migration

The PostgreSQL database has already been created,
no need to create it manually.

* scripts: improve DB migration comment

* Update config.json

* Update tests.toml

* Fix v2 database deletion on error (#434)

* scripts: improve comments

* scripts: manually remove MariaDB database if needed

---------

Co-authored-by: biva <biva@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: ljf <ljf+git@grimaud.me>
Co-authored-by: Kay0u <pierre@kayou.io>
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
2023-09-11 10:48:35 +02:00
Kay0u
b4fcf41f41
delete the psql db if the migration fails 2023-03-07 09:52:10 +01:00
Kayou
386cdb633d
Change arm64 source (#409)
* add entreprise for arm64, use the official build for arm64

* Auto-update README

* update auto-updater script

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>
2023-03-07 08:46:42 +01:00
Éric Gaspar
ec8fa5570a
Transition to PostgreSQL (#377)
* backup script for PostgreSQL (#376)

Inspired from https://github.com/YunoHost-Apps/moodle_ynh/blob/master/scripts/backup

* Adapt to PostgreSQL (#375)

Question: in https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server, I see `BindsTo=postgresql.service` while in the original file here I find `Requires=mysql.service`. I don't know which one makes sense, so I keep the orinigal Yunohost version (Requires)

* config.json for PostgreSQL (#374)

Inspired from the original MySQL config.json and from Mattermost documentation https://docs.mattermost.com/install/install-debian.html#install-postgresql-database-server

* Install with PostgreSQL (#373)

I took inspiration from https://github.com/YunoHost-Apps/commento_ynh/blob/master/scripts/install

* install postgresql

* Reordering

* reset config file

* Update _common.sh

* Update config.json

* Fix

* Migration (#382)

* add migration

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Fix

* Fix

* Fix

* Update install

* Update upgrade

* Fix

* Update install

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update upgrade

* Update install

* Fix

* Fix

* Fix

* Update upgrade

* Cleaning up

* Update upgrade

* Update _common.sh

* Update check_process

* Update _common.sh

* Fix

* Update mysql-to-pg.conf

* Update upgrade

* Update systemd.service

* Cleaning

* Update _common.sh

* Fix

* Update upgrade

* Update _common.sh

* Update upgrade

* Update backup

* Fix

* Fix

* Update upgrade

* Update upgrade

* Update systemd.service

* Update _common.sh

* Revert "Update _common.sh"

This reverts commit d880150af9.

* Cleaning

* Fix

* Update check_process

* Fix

* Update _common.sh

* Fix

* Update _common.sh

* Fix

* Update manifest.json

* Update install

* Update _common.sh

* Update upgrade

* Fix

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Update _common.sh

* Auto-update README

* Update _common.sh

* Upgrade to v7.4.0

* Auto-update README

* Upgrade to v7.5.2

* Auto-update README

* Update config.json

* [fix] mariadb to postgres migration

* Auto-update README

* [fix] Update manifest requirements

* Update manifest.json

* Update config.json

* upgrade config to upstream

* Fix linter

* Update _common.sh

* Fix typo

* Auto-update README

* Update upgrade

* Update scripts/upgrade

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* [enh] Indentation

* Apply suggestions from code review

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* [enh] COmments

* Increase timeout for table creation

Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>

* test upgrade from 7.2.0

* Auto-update README

* fix db_name in case of multi_instance

* Fix 7.3.0 migration

* delete only the problematic value in db_migrations

* Added explanation for migration management from 7.3.0

* mariadb-to-pg: drop stray columns

These should have been removed in a previous migration, but weren't.

See https://github.com/mattermost/mattermost-server/issues/18351#issuecomment-1325648058

* mariadb-to-pg: increase mattermost timeout

On a small VPS the 2 mn timeout is almost reached.
Increase it to 3 mn.

---------

Co-authored-by: biva <biva@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: ljf <ljf+git@grimaud.me>
Co-authored-by: ljf (zamentur) <zamentur@users.noreply.github.com>
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
Co-authored-by: Kay0u <pierre@kayou.io>
2023-03-06 22:26:35 +01:00
Éric Gaspar
5d2dc7add6
adding quotation marks to password variable (#364)
* --keep plugins and config

* Update install

* Update upgrade
2022-05-18 22:59:02 +02:00
Pierre de La Morinerie
acbb2feeab scripts: restore local plugins after an upgrade 2021-12-26 09:54:59 +01:00
Éric Gaspar
678a1d80cb
Remove ynh_detect_arch helper (#317)
ynh_detect_arch is deprecated in favor of YNH_ARCH

* Add  #315 and #316
2021-12-06 12:37:56 +01:00
Pierre de La Morinerie
09cc4fbeb1 upgrade: warn about 6.0 lengthy database migrations 2021-10-31 13:05:13 +01:00
Éric Gaspar
73f75150fe
Set rights (#274)
* Set rights
2021-09-16 11:39:20 +02:00
Pierre de La Morinerie
f8589544d5 scripts: warn about lengthy migrations when upgrading to 5.38.0
The release notes of the 5.38.0 version mention two lengthy database
migrations. Make sure users are told what is going on, so that they
don't think the upgrade failed.
2021-08-17 16:28:53 -05:00
Pierre de La Morinerie
3a3cfdedee scripts: warn about lengthy migration when upgrading from < 5.35 2021-06-15 08:34:59 +02:00
Éric Gaspar
59013d066d
Fix linter (#224)
* Fix linter
* Update manifest.json
* Set password variable to smtp_user_pwd
* Fix doc link
2021-03-17 20:59:57 +01:00
Alexandre Aubin
1a0e23b8a4
Fix backward compatibilty for db_name 2021-01-31 11:30:25 +01:00
Éric Gaspar
504697a984
Update scripts/upgrade
Co-authored-by: Kayou <pierre@kayou.io>
2021-01-14 08:36:16 +01:00
Éric Gaspar
ad1ebec045
Update scripts/upgrade
Co-authored-by: Kayou <pierre@kayou.io>
2021-01-14 08:35:56 +01:00
Éric Gaspar
fc6a600bb9
Add Team and Enterprise (#202)
* Add Team/Entreprise install
2021-01-13 11:31:12 +01:00
Éric Gaspar
c425aa5d94
Arm arch. support (#201)
* Add ARM sources
* Switch to TEAM edition
2021-01-12 10:33:02 +01:00
ericgaspar
7586f58759
Cleaning up 2021-01-12 00:01:16 +01:00
Éric Gaspar
705b3da0e7
repackage (#200)
* repackage
2021-01-11 23:46:48 +01:00
Pierre de La Morinerie
d460d7f2bd scripts: disable questionnable password complexity rules
Enforcing password complexity rules is usually useless, and encourages
bad security.

However, this is not our main issue. The problem is that when installing
Mattermost on Yunohost, if the user chooses a password that doesn't
fullfil all these requirements, the installation will fail with a hard-
to-spot error message.

We don't want this to happen, so we relax the rules a little.

Fix #159
2020-02-10 00:47:38 +01:00
Pierre de La Morinerie
66d31e3171 scripts: use ynh_replace_string instead of sed -i 2020-02-10 00:17:56 +01:00
Pierre de La Morinerie
fefff41733 scripts: remove all usages of sudo
The scripts are already run as root.
2020-02-09 01:07:59 +01:00
Pierre de La Morinerie
f07b4a7822 app: implement subpath support 2020-02-09 01:07:59 +01:00
Pierre de La Morinerie
331fcce8c5 conf: use a Type=notify systemd service
Starting from Mattermost 4.8, the server process sends a systemd
notification when it is ready to accept network connections. Thus we
don't need to explicitely wait for the port to be open in the service.

As a bonus, by removing the hack, we don't need to replace `__PORT__` in
the service anymore–which means the associated script helper can be
removed too.
2018-03-16 18:37:17 +05:30
Pierre de La Morinerie
cad4712038 upgrade: attempt to restore backup only if it was correctly saved 2018-02-05 10:37:42 +05:30
Pierre de La Morinerie
3c9e53fe57 scripts: rename smtp_user to mattermost_user 2018-01-31 11:42:52 +05:30
Pierre de La Morinerie
256cafcb07 scripts: support multi-instance install 2018-01-31 11:42:52 +05:30
Pierre de La Morinerie
0918978e92 scripts: handle port in use 2018-01-31 11:42:52 +05:30
Pierre de La Morinerie
aa7721322d scripts: modernize the publix/private switch
This allow package_check to properly test it.
2018-01-31 11:42:52 +05:30
Pierre de La Morinerie
d2566887a8 upgrade: use app.src 2017-10-23 12:22:40 +05:30
Pierre de La Morinerie
b4f05f6449 scripts: move logs to a subdirectory of /var/log
This allows to give permission to the `mattermost` user to
write new files in this subdirectory, which is needed for
log rotation.

Fix #61
2017-10-17 10:36:25 +05:30
Pierre de La Morinerie
d79c4fcfe4 scripts: advertise service in admin panel 2017-10-16 09:14:20 +05:30
Pierre de La Morinerie
e8c51d4715 scripts: use systemd rather than supervisor
Systemd is now the standard way of doing services in
Yunohost. It also avoids to install an extra dependency.

Fix #43
2017-10-16 09:05:21 +05:30
Pierre de La Morinerie
faa51975af upgrade: backup before upgrading, and restore backup on failure 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
ee7b6a1522 upgrade: improve comments 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
f781efb160 scripts: use ynh_add_nginx_config helper 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
cc846f64b4 Fix logs location
The log location used to be a filename, but it is now a
path since Mattermost 3.8.

Having a path was tolerated in Mattermost <= 4.1, but crashes
the server starting from Mattermost 4.2.0.
2017-10-10 17:04:43 +05:30
Pierre de La Morinerie
ebaea2dbda scripts: use ynh_abort_if_errors helper 2017-10-10 16:36:28 +05:30
Pierre de La Morinerie
752b049866 upgrade: don’t warn when the archive file doesn’t exist 2017-09-12 15:30:38 +05:30
Pierre de La Morinerie
ca8a3c761d upgrade: stop the server after downloading the new release
This will minimize downtime.
2017-09-12 15:30:38 +05:30
Pierre de La Morinerie
ff4f8ba8fd upgrade: fix syntax error in the die_command variable 2017-09-12 15:30:38 +05:30
Pierre de La Morinerie
cb0d4ddc75 scripts: modernize and fix linter warnings 2017-09-11 12:53:22 +05:30
Pierre de La Morinerie
30ed4e710e scripts: exit on unbound variables
Fixes a package_linter warning.
2017-09-11 12:53:22 +05:30
kemenaran
aaec1ec07c Update nginx configuration file on upgrade 2017-07-21 22:08:33 +02:00
Pierre de La Morinerie
ed8d078d8e Use the new Mattermost download URL 2016-04-17 18:35:42 +02:00
Pierre de La Morinerie
60a0e984f5 Fix upgrade script failure handler 2016-04-17 18:03:21 +02:00
Pierre de La Morinerie
a317cb77f8 Add upgrade script 2015-11-18 17:24:09 +01:00