Compare commits
87 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81ac2cc3ef | ||
|
|
b860029b4d | ||
|
|
79c6816637 | ||
|
|
b4f4d6c6d7 | ||
|
|
faa7d971d8 | ||
|
|
a909907549 | ||
|
|
aa25d3a8a6 | ||
|
|
dd321b7692 | ||
|
|
aa5641d8e3 | ||
|
|
97b48bbf09 | ||
|
|
ddf3bb0f0f | ||
|
|
95520a4db8 | ||
|
|
9b5f98a012 | ||
|
|
a52d936e3a | ||
|
|
f4df38808b | ||
|
|
386ebc4c2e | ||
|
|
88a45ed387 | ||
|
|
330445dce2 | ||
|
|
39b6be7758 | ||
|
|
eb9d195d90 | ||
|
|
870b6edd28 | ||
|
|
728e71205d | ||
|
|
fb1518bea0 | ||
|
|
3121d39e16 | ||
|
|
6ff004dff4 | ||
|
|
6e2c3efdc3 | ||
|
|
c7e8ca4547 | ||
|
|
ab1dda626d | ||
|
|
9ee988d27b | ||
|
|
b4c7aee5f1 | ||
|
|
ac9d1ec764 | ||
|
|
4d5b598637 | ||
|
|
06ca9ee5c1 | ||
|
|
832596ffd2 | ||
|
|
6d0ae34475 | ||
|
|
56fe900e4f | ||
|
|
ab1c0b8439 | ||
|
|
ed92a0f504 | ||
|
|
4ef778f648 | ||
|
|
b3fe489e59 | ||
|
|
5765425c9a | ||
|
|
269a9006d3 | ||
|
|
b6796cfa4a | ||
|
|
36d3fb2b28 | ||
|
|
4927c472b2 | ||
|
|
3b958ac191 | ||
|
|
7411371c71 | ||
|
|
fd1e4de961 | ||
|
|
366dc14493 | ||
|
|
6816d6149f | ||
|
|
e16427f845 | ||
|
|
a6071d4033 | ||
|
|
d98ca6c994 | ||
|
|
72d940bf3c | ||
|
|
db1f458eeb | ||
|
|
56b1f0e570 | ||
|
|
689d0eb968 | ||
|
|
ff24c25a00 | ||
|
|
d37c67945b | ||
|
|
ed6089fa9e | ||
|
|
12ef520670 | ||
|
|
31d5a35c71 | ||
|
|
2387319ee8 | ||
|
|
3e3ab28b6c | ||
|
|
db557c0fbb | ||
|
|
f9c76832f5 | ||
|
|
5936da2f83 | ||
|
|
7b9ac6ad1e | ||
|
|
ded357a287 | ||
|
|
63d387c472 | ||
|
|
8ec3c660c4 | ||
|
|
686452a757 | ||
|
|
3c449e9663 | ||
|
|
54be68afa6 | ||
|
|
5b5b71a7bf | ||
|
|
f475f4a0e6 | ||
|
|
b8a88f69fa | ||
|
|
133bd45fdd | ||
|
|
060e41d15b | ||
|
|
323c9a516c | ||
|
|
8c9e1868c0 | ||
|
|
3bb98962fb | ||
|
|
a43e78fb26 | ||
|
|
6bcdb279e0 | ||
|
|
e8af77fcb2 | ||
|
|
a5c697864f | ||
|
|
88485a2161 |
34
README.md
34
README.md
@ -3,10 +3,11 @@ 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))
|
||||
* BTCPay Server Web Installer/Configurator - ([install.btcpayserver.org](https://install.btcpayserver.org))
|
||||
* Plugin Builder - ([plugin-builder.btcpayserver.org](https://plugin-builder.btcpayserver.org))
|
||||
|
||||
## How to use
|
||||
|
||||
@ -14,8 +15,6 @@ 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=...
|
||||
@ -23,26 +22,39 @@ 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
|
||||
```
|
||||
|
||||
## Aditional settings
|
||||
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
|
||||
|
||||
We advise you to change `PluginSettings/EnableUploads` to true manually (`/var/lib/docker/volumes/root_mm-config/_data/config.json`).
|
||||
|
||||
|
||||
17
delete-spammer.sh
Executable file
17
delete-spammer.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/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:stable
|
||||
image: nginx:1.25.3-bookworm
|
||||
container_name: nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
@ -16,7 +16,7 @@ services:
|
||||
|
||||
nginx-gen:
|
||||
restart: unless-stopped
|
||||
image: btcpayserver/docker-gen:0.7.4
|
||||
image: btcpayserver/docker-gen:0.10.7
|
||||
container_name: nginx-gen
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/tmp/docker.sock:ro"
|
||||
@ -28,11 +28,10 @@ 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:1.12.2
|
||||
image: btcpayserver/letsencrypt-nginx-proxy-companion:2.2.9-2
|
||||
container_name: letsencrypt-nginx-proxy-companion
|
||||
volumes:
|
||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||
@ -40,6 +39,7 @@ 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,41 +47,22 @@ 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: mattermost/mattermost-prod-db:v5.31.4
|
||||
image: btcpayserver/postgres:18.1
|
||||
volumes:
|
||||
- mm-dbdata:/var/lib/postgresql/data
|
||||
- mm-dbdata:/var/lib/postgresql
|
||||
- /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-prod-app:v5.31.4
|
||||
image: mattermost/mattermost-team-edition:10.4.1
|
||||
volumes:
|
||||
- mm-config:/mattermost/config:rw
|
||||
- mm-data:/mattermost/data:rw
|
||||
@ -90,25 +71,26 @@ services:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
environment:
|
||||
# use service's hostname
|
||||
DB_HOST: "mattermost_db"
|
||||
DB_PORT_NUMBER: 5432
|
||||
MM_USERNAME: "mmuser"
|
||||
MM_PASSWORD: "mmuser_password"
|
||||
MM_DBNAME: "mattermost"
|
||||
VIRTUAL_PORT: "8000"
|
||||
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"
|
||||
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.18.3
|
||||
image: 42wim/matterbridge:1.26.0
|
||||
volumes:
|
||||
- ./matterbridge.toml:/matterbridge.toml
|
||||
configurator:
|
||||
restart: unless-stopped
|
||||
image: btcpayserver/btcpayserver-configurator:0.0.22
|
||||
image: ghcr.io/btcpayserver/btcpayserver-configurator:0.0.28
|
||||
environment:
|
||||
LETSENCRYPT_HOST: ${CONFIGURATOR_HOST}
|
||||
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}
|
||||
@ -117,7 +99,7 @@ services:
|
||||
- "80"
|
||||
|
||||
fireflyiii:
|
||||
image: jc5x/firefly-iii:latest
|
||||
image: fireflyiii/core:version-5.7.15
|
||||
environment:
|
||||
- APP_ENV=local
|
||||
- APP_KEY=MustBe32DropDbAndChangeItIfUWant
|
||||
@ -137,17 +119,19 @@ services:
|
||||
expose:
|
||||
- 8080
|
||||
volumes:
|
||||
- firefly_iii_export:/var/www/firefly-iii/storage/export
|
||||
- firefly_iii_upload:/var/www/firefly-iii/storage/upload
|
||||
- firefly_iii_export:/var/www/html/storage/export
|
||||
- firefly_iii_upload:/var/www/html/storage/upload
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
postgres:
|
||||
restart: unless-stopped
|
||||
image: postgres:9.6.5
|
||||
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
|
||||
volumes:
|
||||
- "postgres_datadir:/var/lib/postgresql/data"
|
||||
|
||||
- "postgres_datadir:/var/lib/postgresql"
|
||||
|
||||
volumes:
|
||||
nginx_conf:
|
||||
@ -161,4 +145,5 @@ volumes:
|
||||
mm-plugins:
|
||||
firefly_iii_export:
|
||||
firefly_iii_upload:
|
||||
postgres_datadir:
|
||||
postgres_datadir:
|
||||
acme:
|
||||
|
||||
@ -14,9 +14,6 @@
|
||||
|
||||
[telegram.btcpay]
|
||||
Token="{TELEGRAM_TOKEN}"
|
||||
|
||||
[gitter.nbitcoin]
|
||||
Token="{GITTER_TOKEN}"
|
||||
|
||||
[general]
|
||||
RemoteNickFormat="[{PROTOCOL} - {NICK}]"
|
||||
@ -25,10 +22,6 @@ RemoteNickFormat="[{PROTOCOL} - {NICK}]"
|
||||
name = "nbitcoin"
|
||||
enable=true
|
||||
|
||||
[[gateway.inout]]
|
||||
account = "gitter.nbitcoin"
|
||||
channel="MetacoSA/NBitcoin"
|
||||
|
||||
[[gateway.inout]]
|
||||
account ="slack.forkbitpay"
|
||||
channel = "nbitcoin"
|
||||
@ -92,52 +85,3 @@ 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,6 +60,9 @@ 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,7 +8,6 @@ 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