Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fec419b20b |
34
README.md
34
README.md
@ -3,11 +3,10 @@ The docker compose running several services for the BTCPay Server community
|
||||
|
||||
It contains the following services for the community:
|
||||
|
||||
* Slack invite - ([slack.btcpayserver.org](https://slack.btcpayserver.org))
|
||||
* Mattermost server - ([chat.btcpayserver.org](https://chat.btcpayserver.org))
|
||||
* Slack invite. ([slack.btcpayserver.org](https://slack.btcpayserver.org))
|
||||
* Mattermost server ([chat.btcpayserver.org](https://chat.btcpayserver.org))
|
||||
* Bot which bridge IRC, MatterMost, Slack and Telegram.
|
||||
* BTCPay Server Web Installer/Configurator - ([install.btcpayserver.org](https://install.btcpayserver.org))
|
||||
* Plugin Builder - ([plugin-builder.btcpayserver.org](https://plugin-builder.btcpayserver.org))
|
||||
* BTCPay Server Web Installer/Configurator. ([install.btcpayserver.org](https://install.btcpayserver.org))
|
||||
|
||||
## How to use
|
||||
|
||||
@ -15,6 +14,8 @@ Create a `.env` file with the following content:
|
||||
|
||||
```bash
|
||||
SLACK_TOKEN=xoxp-secret-token
|
||||
SLACK_HOST=slack.btcpayserver.org
|
||||
SLACK_URL=forkbitpay.slack.com
|
||||
MATTERMOST_HOST=chat.btcpayserver.org
|
||||
CONFIGURATOR_HOST=install.btcpayserver.org
|
||||
TELEGRAM_TOKEN=...
|
||||
@ -22,39 +23,26 @@ FIREFLY_HOST=firefly.btcpayserver.org
|
||||
```
|
||||
Where:
|
||||
* `SLACK_TOKEN` is your secret slack token
|
||||
* `SLACK_HOST` is the slack invite domain name
|
||||
* `SLACK_URL` is the slack website of your community
|
||||
* `MATTERMOST_HOST` is the mattermost domain name
|
||||
* `BOT_NICKNAME` is the name of the bot on mattermost
|
||||
* `BOT_PASS` is the pass of the bot on mattermost
|
||||
* `TELEGRAM_TOKEN` is the telegram token
|
||||
* `GITTER_TOKEN` is the gitter token
|
||||
* `CONFIGURATOR_HOST` is the configurator domain name
|
||||
* `FIREFLY_HOST` is the our firefly domain name
|
||||
|
||||
This assume that `MATTERMOST_HOST`, and `CONFIGURATOR_HOST` are pointing to your server.
|
||||
|
||||
This assume that `SLACK_HOST`, `MATTERMOST_HOST`, and `CONFIGURATOR_HOST` are pointing to your server.
|
||||
Then you can run:
|
||||
|
||||
```bash
|
||||
./update-mattermost.sh
|
||||
docker compose up -d
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
Please note that previously used `docker-compose` will now likely fail in setup. So ensure you are consistenly using `docker compose` without -.
|
||||
|
||||
## Updating Services
|
||||
|
||||
If you need to update the version of a service (e.g., Plugin Builder), follow these steps:
|
||||
|
||||
1. Update the `docker-compose.yml` file in the repository and push commit.
|
||||
2. On the server, run the following commands:
|
||||
|
||||
```bash
|
||||
git pull
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
On legacy servers, using new `docker compose` instead of `docker-compose`, you may get a warning that volume already exists, but that shouldn't be a problem. We will add a guide on migrating to remove the warning as we further improve the repository.
|
||||
|
||||
## Additional settings
|
||||
## Aditional settings
|
||||
|
||||
We advise you to change `PluginSettings/EnableUploads` to true manually (`/var/lib/docker/volumes/root_mm-config/_data/config.json`).
|
||||
|
||||
|
||||
@ -1,17 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
username="$(echo "$1" | xargs)"
|
||||
echo "Trying to delete $username"
|
||||
psql="docker exec -ti root_mattermost_db_1 psql -U mmuser -d mattermost"
|
||||
userid=$($psql -qtAX -c "SELECT id FROM users WHERE username='$username'")
|
||||
if [[ $userid ]]; then
|
||||
echo "User found deleting..."
|
||||
$psql -c "DELETE FROM users WHERE username='$username';"
|
||||
$psql -c "DELETE FROM posts WHERE userid='$userid';"
|
||||
$psql -c "DELETE FROM channelmembers WHERE userid='$userid';"
|
||||
find /var/lib/docker/volumes/root_mm-data/_data -type d | grep $userid | tr "\n" "\0" | xargs -0 rm -rf
|
||||
$psql -c "DELETE FROM sessions WHERE userid='$userid';"
|
||||
$psql -c "DELETE FROM fileinfo WHERE creatorid='$userid';"
|
||||
else
|
||||
echo "User not found"
|
||||
fi
|
||||
@ -3,7 +3,7 @@ version: "3"
|
||||
services:
|
||||
nginx:
|
||||
restart: unless-stopped
|
||||
image: nginx:1.25.3-bookworm
|
||||
image: nginx:stable
|
||||
container_name: nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
@ -16,7 +16,7 @@ services:
|
||||
|
||||
nginx-gen:
|
||||
restart: unless-stopped
|
||||
image: btcpayserver/docker-gen:0.10.7
|
||||
image: btcpayserver/docker-gen:0.7.4
|
||||
container_name: nginx-gen
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/tmp/docker.sock:ro"
|
||||
@ -28,10 +28,11 @@ services:
|
||||
entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
|
||||
links:
|
||||
- nginx
|
||||
- slack
|
||||
|
||||
letsencrypt-nginx-proxy-companion:
|
||||
restart: unless-stopped
|
||||
image: btcpayserver/letsencrypt-nginx-proxy-companion:2.2.9-2
|
||||
image: btcpayserver/letsencrypt-nginx-proxy-companion:1.12.2
|
||||
container_name: letsencrypt-nginx-proxy-companion
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
@ -39,7 +40,6 @@ services:
|
||||
- "nginx_vhost:/etc/nginx/vhost.d"
|
||||
- "nginx_html:/usr/share/nginx/html"
|
||||
- "nginx_certs:/etc/nginx/certs:rw"
|
||||
- "acme:/etc/acme.sh"
|
||||
environment:
|
||||
NGINX_DOCKER_GEN_CONTAINER: "nginx-gen"
|
||||
NGINX_PROXY_CONTAINER: "nginx"
|
||||
@ -47,22 +47,41 @@ services:
|
||||
links:
|
||||
- nginx-gen
|
||||
- mattermost_app
|
||||
slack:
|
||||
image: nicolasdorier/slack-invite-automation:latest
|
||||
restart: unless-stopped
|
||||
container_name: slack
|
||||
command: "node ./bin/www"
|
||||
environment:
|
||||
SLACK_URL: ${SLACK_URL:-forkbitpay.slack.com}
|
||||
PORT: 80
|
||||
COMMUNITY_NAME: "BTCPay Server"
|
||||
SLACK_TOKEN: ${SLACK_TOKEN}
|
||||
VIRTUAL_HOST: ${SLACK_HOST}
|
||||
SSL_POLICY: "Mozilla-Modern"
|
||||
VIRTUAL_PORT: "80"
|
||||
VIRTUAL_NETWORK: "nginx-proxy"
|
||||
LETSENCRYPT_HOST: ${SLACK_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
expose:
|
||||
- 80
|
||||
mattermost_db:
|
||||
image: btcpayserver/postgres:18.1
|
||||
image: mattermost/mattermost-prod-db:v5.31.4
|
||||
volumes:
|
||||
- mm-dbdata:/var/lib/postgresql
|
||||
- mm-dbdata:/var/lib/postgresql/data
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||
- POSTGRES_USER=mmuser
|
||||
- POSTGRES_PASSWORD=mmuser_password
|
||||
- POSTGRES_DB=mattermost
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
- 5432
|
||||
links:
|
||||
- mattermost_app
|
||||
mattermost_app:
|
||||
restart: unless-stopped
|
||||
image: mattermost/mattermost-team-edition:10.4.1
|
||||
image: mattermost/mattermost-prod-app:v5.31.4
|
||||
volumes:
|
||||
- mm-config:/mattermost/config:rw
|
||||
- mm-data:/mattermost/data:rw
|
||||
@ -71,26 +90,25 @@ services:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
# use service's hostname
|
||||
MM_SQLSETTINGS_DRIVERNAME: postgres
|
||||
MM_SQLSETTINGS_DATASOURCE: postgres://mmuser:mmuser_password@mattermost_db:5432/mattermost?sslmode=disable&connect_timeout=10
|
||||
MM_SERVICESETTINGS_SITEURL: https://${MATTERMOST_HOST}
|
||||
DOMAIN: ${MATTERMOST_HOST}
|
||||
VIRTUAL_PORT: "8065"
|
||||
DB_HOST: "mattermost_db"
|
||||
DB_PORT_NUMBER: 5432
|
||||
MM_USERNAME: "mmuser"
|
||||
MM_PASSWORD: "mmuser_password"
|
||||
MM_DBNAME: "mattermost"
|
||||
VIRTUAL_PORT: "8000"
|
||||
VIRTUAL_HOST: ${MATTERMOST_HOST}
|
||||
VIRTUAL_NETWORK: "nginx-proxy"
|
||||
LETSENCRYPT_HOST: ${MATTERMOST_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
EDITION: "team"
|
||||
depends_on:
|
||||
- mattermost_db
|
||||
mattermost_bridge:
|
||||
restart: unless-stopped
|
||||
image: 42wim/matterbridge:1.26.0
|
||||
image: 42wim/matterbridge:1.18.3
|
||||
volumes:
|
||||
- ./matterbridge.toml:/matterbridge.toml
|
||||
configurator:
|
||||
restart: unless-stopped
|
||||
image: ghcr.io/btcpayserver/btcpayserver-configurator:0.0.28
|
||||
image: btcpayserver/btcpayserver-configurator:0.0.22
|
||||
environment:
|
||||
LETSENCRYPT_HOST: ${CONFIGURATOR_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
@ -99,7 +117,7 @@ services:
|
||||
- "80"
|
||||
|
||||
fireflyiii:
|
||||
image: fireflyiii/core:version-5.7.15
|
||||
image: fireflyiii/core:latest
|
||||
environment:
|
||||
- APP_ENV=local
|
||||
- APP_KEY=MustBe32DropDbAndChangeItIfUWant
|
||||
@ -119,19 +137,17 @@ services:
|
||||
expose:
|
||||
- 8080
|
||||
volumes:
|
||||
- firefly_iii_export:/var/www/html/storage/export
|
||||
- firefly_iii_upload:/var/www/html/storage/upload
|
||||
- firefly_iii_export:/var/www/firefly-iii/storage/export
|
||||
- firefly_iii_upload:/var/www/firefly-iii/storage/upload
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: btcpayserver/postgres:18.1
|
||||
command: [ "-c", "random_page_cost=1.0", "-c", "shared_preload_libraries=pg_stat_statements" ]
|
||||
environment:
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
image: postgres:9.6.5
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql"
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
|
||||
|
||||
volumes:
|
||||
nginx_conf:
|
||||
@ -145,5 +161,4 @@ volumes:
|
||||
mm-plugins:
|
||||
firefly_iii_export:
|
||||
firefly_iii_upload:
|
||||
postgres_datadir:
|
||||
acme:
|
||||
postgres_datadir:
|
||||
|
||||
@ -14,6 +14,9 @@
|
||||
|
||||
[telegram.btcpay]
|
||||
Token="{TELEGRAM_TOKEN}"
|
||||
|
||||
[gitter.nbitcoin]
|
||||
Token="{GITTER_TOKEN}"
|
||||
|
||||
[general]
|
||||
RemoteNickFormat="[{PROTOCOL} - {NICK}]"
|
||||
@ -22,6 +25,10 @@ RemoteNickFormat="[{PROTOCOL} - {NICK}]"
|
||||
name = "nbitcoin"
|
||||
enable=true
|
||||
|
||||
[[gateway.inout]]
|
||||
account = "gitter.nbitcoin"
|
||||
channel="MetacoSA/NBitcoin"
|
||||
|
||||
[[gateway.inout]]
|
||||
account ="slack.forkbitpay"
|
||||
channel = "nbitcoin"
|
||||
@ -85,3 +92,52 @@ RemoteNickFormat="[{PROTOCOL} - {NICK}]"
|
||||
[[gateway.inout]]
|
||||
account ="mattermost.btcpay"
|
||||
channel = "lightning"
|
||||
|
||||
[[gateway]]
|
||||
name = "website"
|
||||
enable=true
|
||||
|
||||
[[gateway.inout]]
|
||||
account ="slack.forkbitpay"
|
||||
channel = "website"
|
||||
|
||||
[[gateway.inout]]
|
||||
account ="mattermost.btcpay"
|
||||
channel = "website"
|
||||
|
||||
[[gateway]]
|
||||
name = "translations"
|
||||
enable=true
|
||||
|
||||
[[gateway.inout]]
|
||||
account ="slack.forkbitpay"
|
||||
channel = "translations"
|
||||
|
||||
[[gateway.inout]]
|
||||
account ="mattermost.btcpay"
|
||||
channel = "translations"
|
||||
|
||||
[[gateway]]
|
||||
name = "internet-of-shit"
|
||||
enable=true
|
||||
|
||||
[[gateway.inout]]
|
||||
account ="slack.forkbitpay"
|
||||
channel = "internetofshit"
|
||||
|
||||
[[gateway.inout]]
|
||||
account ="mattermost.btcpay"
|
||||
channel = "raspberry-pi"
|
||||
|
||||
[[gateway]]
|
||||
name = "offtopic"
|
||||
enable=true
|
||||
|
||||
[[gateway.inout]]
|
||||
account ="slack.forkbitpay"
|
||||
channel = "random"
|
||||
|
||||
[[gateway.inout]]
|
||||
account ="mattermost.btcpay"
|
||||
channel = "off-topic"
|
||||
|
||||
|
||||
@ -60,9 +60,6 @@ map $scheme $proxy_x_forwarded_ssl {
|
||||
https on;
|
||||
}
|
||||
|
||||
deny 150.230.32.22;
|
||||
deny 198.188.7.152;
|
||||
deny 192.9.235.178;
|
||||
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
log_format vhost '$host $remote_addr - $remote_user [$time_local] '
|
||||
|
||||
@ -8,6 +8,7 @@ sed -i -e "s|{BOT_NICKNAME}|$BOT_NICKNAME|g" "$MATTERMOST_FILE"
|
||||
sed -i -e "s|{BOT_PASS}|$BOT_PASS|g" "$MATTERMOST_FILE"
|
||||
sed -i -e "s|{SLACK_TOKEN}|$SLACK_TOKEN|g" "$MATTERMOST_FILE"
|
||||
sed -i -e "s|{TELEGRAM_TOKEN}|$TELEGRAM_TOKEN|g" "$MATTERMOST_FILE"
|
||||
sed -i -e "s|{GITTER_TOKEN}|$GITTER_TOKEN|g" "$MATTERMOST_FILE"
|
||||
sed -i -e "s|{MATTERMOST_HOST}|$MATTERMOST_HOST|g" "$MATTERMOST_FILE"
|
||||
|
||||
echo "Generated $MATTERMOST_FILE from .env file parameters"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user