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

68 commits

Author SHA1 Message Date
Éric Gaspar
c88d6ea78f
Merge testing into master (migration to PostgreSQL, change arm64 source, Matermost v7.5.2) (#411)
* Upgrade to v7.3.0

* Auto-update README

* Update config.json

* Upgrade auto-updater (#407)

* [autopatch] Upgrade auto-updater

* Auto-update README

---------

Co-authored-by: tituspijean <titus@pijean.ovh>

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

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

* delete the psql db if the migration fails

* Drop all Focalbard tables if mattermost is in 7.3.0

---------

Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: Pierre de La Morinerie <kemenaran@gmail.com>
Co-authored-by: tituspijean <titus@pijean.ovh>
Co-authored-by: biva <biva@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: Kay0u <pierre@kayou.io>
2023-03-14 11:16:39 +01:00
Éric Gaspar
485136c06a
Cleaning (#380)
* Cleaning var

* Cleaning var
2022-06-25 11:03:29 +02: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
É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
16db0114dc scripts: fix mmctl detection 2021-11-12 22:05:35 +01:00
Pierre de La Morinerie
b20163105d scripts: skip user and team creation if mmctl is missing
mmctl is not available for ARM builds yet.

See #306
2021-11-05 16:43:05 +01:00
Pierre de La Morinerie
0aa89327da scripts: use an absolute path when invoking mmctl
It seems on some distros (like Raspian), the current working directory
is not preserved accross sudo invocations, which causes an "bin/mmctl
not found" error.

Fix #304
2021-11-05 11:08:20 +01:00
Pierre de La Morinerie
5af7f2183f scripts: fix the syntax for adding a user to a team 2021-11-01 22:41:51 +01:00
Pierre de La Morinerie
f983391fb7 scripts: create and confirm the first user in the same step 2021-11-01 22:41:51 +01:00
Pierre de La Morinerie
b3647e3db5 config: store the socket file in a writable location
On Yunhost `/var/tmp` is only writable by root.
2021-11-01 22:41:51 +01:00
Pierre de La Morinerie
0bb5458e66 scripts: use newer option name instead of deprecated one 2021-11-01 22:41:51 +01:00
Pierre de La Morinerie
940589206b install: replace bin/mattermost by bin/mmctl
`mmctl` is supposed to authenticate as one of the admin users. But since
this is the first user we're creating, there are no admin yet.

So in order to create the first user, we:

1. enable mmctl's "local mode", which connects to the Mattermost server
   through a socket (rather than through the authenticated API), 
2. create the first user and team,
3. disable the "local mode".
2021-10-30 22:06:56 +02:00
Éric Gaspar
73f75150fe
Set rights (#274)
* Set rights
2021-09-16 11:39:20 +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
ericgaspar
84b90878c0
Update install 2021-01-28 17:04:45 +01:00
ericgaspar
7d830c3758
Update install 2021-01-28 17:02:43 +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
6826e253b4 scripts: use a per-instance db username
The scripts still uses "mmuser" by default, for retro-compatibility.
2020-02-18 22:31:15 +01:00
Pierre de La Morinerie
24261f8b7f Merge remote-tracking branch 'origin/master' into testing 2020-02-14 14:43:46 +01:00
Pierre de La Morinerie
efbe7c8dad scripts: fix SMTP port on install
Fix #156
2020-02-14 14:37:35 +01:00
Pierre de La Morinerie
f00398be3c scripts: use helper for generating random passwords 2020-02-10 01:39:37 +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
9f19e0c550 Replace invokations of bin/platform to bin/mattermost 2018-07-12 08:30:47 +02: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
15e19ce6c9 Create first user and team from the app install 2018-02-16 19:27:04 +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
frju365
bede450e88 install: use app.src 2017-10-23 12:22:33 +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
bcb5f88e95 install: configure SiteURL
This is a mandatory variable since Mattermost 3.8.

See https://docs.mattermost.com/administration/config-settings.html#site-url

Fix #50
2017-10-12 12:53:55 +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
f1b741980f install: remove the custom error handler
Yunohost will automatically execute the `remove` script anyway
after a failed install.
2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
e37638f2f8 install: modernize script with Yunohost 2.6.4 helpers 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
f524bd7940 install: improve comments 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
c51127e1eb install: don’t fail to remove database if not exist 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
533f10d93b install: don’t print an error if archive doesn’t exist 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
9286fe5e85 install: install error handler before creating the database 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
51b8880157 install: use the $YNH_APP_INSTANCE_NAME variable 2017-10-12 12:27:09 +05:30
Pierre de La Morinerie
ee502444c6 install: modernize checking for domain availability 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