A Nextcloud app for Mattermost.
- Run Mattermost server https://github.com/mattermost/mattermost-server/blob/master/README.md
- Install/Enable Apps plugin https://github.com/mattermost/mattermost-plugin-apps
- Run NC server
docker run -d -p 8081:80 nextcloud:latest
- Crete NC admin account via opening NC link http://localhost:8081
Note
: After user creation install recommended apps - Inside docker container find config.php and add NC ngrok url to trusted domains
docker exec -it %NEXTCLOUD_SERVER_DOCKER_CONTAINER_ID% /bin/sh
cd config
apt-get update
apt-get install nano
nano config.php
'trusted_domains' =>
array (
0 => 'localhost:8081',
1 => '%YOUR_NC_DOMAIN%.ngrok.io',
),
Note
: For HTTPS connection add to config.php
'overwriteprotocol' => 'https',
- Register a NC app - http(s)://YOUR_NC_URL/settings/admin/security
- as a callback url use - http(s)://YOUR_MM_SERVER/plugins/com.mattermost.apps/apps/nextcloud/oauth2/remote/complete
- Copy the client secret for a future step
- Run Nextcloud integration server app
- Run
docker-compose up
in the root of the Nextcloud App repository
- Run
- In mattermost channel run
/apps install http http://localhost:8082/manifest.json
Note
: For http deploy type JWT_SECRET env variable contains value for Outgoing JWT Secret field
- Run command
/nextcloud configure
and provide Nextcloud instance url ,client id and client secret from register a Nextcloud app step http://YOUR_NC_URL/settings/YOUR_ADMIN_USER/security - Run command
/nextcloud connect
and open link from bot response for linking mm with Nextcloud account
/nextcloud share
- share public link for user file in MM channel/nextcloud calendars
- show user calendars- Message actions - Upload file to Nextcloud
In project root run command make dist-aws
https://developers.mattermost.com/integrate/apps/deploy/deploy-aws/
go run ./cmd/appsctl aws deploy -v bundle-aws.zip
Increase RAM and timeout ( Lambda -> Configuration -> General Configuration)
Add environmental variables:
( Lambda-> Configuration -> Environment variables)
CHUNK_FILE_SIZE_MB
MAX_FILE_SIZE_MB
MAX_FILES_SIZE_MB
GIN_MODE=release
MAX_REQUEST_RETRIES=3
Add environmental variables:
JWT_SECRET=secret
STATIC_FOLDER=static
APP_TYPE=HTTP
CHUNK_FILE_SIZE_MB=15
MAX_FILE_SIZE_MB=25
MAX_FILES_SIZE_MB=50
APP_URL=http://localhost:8082
PORT=8082
GIN_MODE=release
MAX_REQUEST_RETRIES=3