Some fixes and updates

This commit is contained in:
A 2025-01-13 14:24:16 -08:00
parent 8420d67968
commit 3beb597593
8 changed files with 57 additions and 48 deletions

View File

@ -9,7 +9,7 @@ services:
### ELEMENT ### ELEMENT
# synapse is a matrix homeserver running as a service # synapse is a matrix homeserver running as a service
synapse: synapse:
image: matrixdotorg/synapse:v1.110.0 image: matrixdotorg/synapse:v1.121.1
entrypoint: entrypoint:
- sh - sh
- -c - -c
@ -71,7 +71,7 @@ services:
# element is a matrix web GUI running as a service # element is a matrix web GUI running as a service
element: element:
image: vectorim/element-web:v1.11.69 image: vectorim/element-web:v1.11.88
networks: networks:
- back - back
ports: ports:

View File

@ -10,10 +10,6 @@ volumes:
mastodon_db: mastodon_db:
services: services:
### MASTODON ### MASTODON
caddy:
image: caddy:2.6.4
volumes:
- mastodon_public:/srv/mastodon/public:ro
mastodon-redis: mastodon-redis:
restart: always restart: always
@ -32,11 +28,10 @@ services:
image: tootsuite/mastodon:v4.3.0 image: tootsuite/mastodon:v4.3.0
#healthcheck: #healthcheck:
#test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1'] #test: ['CMD-SHELL', 'wget -q --spider --proxy=off localhost:3000/health || exit 1']
#entrypoint: entrypoint:
# - bash - bash
# - -c - -c
# #- "bundle exec rake db:prepare && cd /opt/mastodon && /usr/bin/tini -- bundle exec rails server" - "cd /opt/mastodon && /usr/bin/tini -- bundle exec rails server"
# - "[[ -e /mastodon/public/db.lock ]] && touch /mastodon/public/db.lock || touch /mastodon/public/db.lock && bundle exec rake db:prepare; /usr/bin/tini -- bundle exec rails server"
env_file: ../mastodon/env.production env_file: ../mastodon/env.production
ports: ports:
- "127.0.0.1:3000:3000" - "127.0.0.1:3000:3000"
@ -49,8 +44,11 @@ services:
- mastodon-redis - mastodon-redis
- mastodon-streaming - mastodon-streaming
volumes: volumes:
# https://www.digitalocean.com/community/tutorials/how-to-share-data-between-docker-containers - type: volume
- mastodon_public:/mastodon/public/ # map static files in volume for caddy source: mastodon_public
target: /mastodon/public/system
volume:
subpath: system
networks: networks:
- mast-int - mast-int
- back - back
@ -58,7 +56,7 @@ services:
mastodon-streaming: mastodon-streaming:
restart: always restart: always
image: tootsuite/mastodon:v4.3.0 image: tootsuite/mastodon-streaming:v4.3.2
healthcheck: healthcheck:
test: wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1 test: wget -q --spider --proxy=off localhost:4000/api/v1/streaming/health || exit 1
] ]
@ -79,11 +77,11 @@ services:
mastodon-sidekiq: mastodon-sidekiq:
restart: always restart: always
image: tootsuite/mastodon:v4.3.0 image: tootsuite/mastodon:v4.3.2
#entrypoint: entrypoint:
# - sh - sh
# - -c - -c
# - "service sendmail start && /usr/bin/tini -- bundle exec sidekiq" - "service sendmail start && /usr/bin/tini -- bundle exec sidekiq"
healthcheck: healthcheck:
test: ps aux | grep '[s]idekiq\ 6' || false test: ps aux | grep '[s]idekiq\ 6' || false
env_file: ../mastodon/env.production env_file: ../mastodon/env.production
@ -95,7 +93,11 @@ services:
- mastodon-db - mastodon-db
- mastodon-redis - mastodon-redis
volumes: volumes:
- mastodon_public:/mastodon/public/ - type: volume
source: mastodon_public
target: /mastodon/public/system
volume:
subpath: system
networks: networks:
- mast-int - mast-int
restart: always restart: always

View File

@ -179,7 +179,7 @@ matrix_config () {
-e SYNAPSE_SERVER_NAME=matrix.$DWEB_DOMAIN \ -e SYNAPSE_SERVER_NAME=matrix.$DWEB_DOMAIN \
-e SYNAPSE_REPORT_STATS=no \ -e SYNAPSE_REPORT_STATS=no \
-e SYNAPSE_DATA_DIR=/data \ -e SYNAPSE_DATA_DIR=/data \
matrixdotorg/synapse:v1.80.0 generate 2>/dev/null matrixdotorg/synapse:v1.121.1 generate 2>/dev/null
sudo chown -R $USER:$USER $DCOMMS_DIR/conf/synapse/ sudo chown -R $USER:$USER $DCOMMS_DIR/conf/synapse/
sed -i -z "s/database.*homeserver.db//" $DCOMMS_DIR/conf/element/config.json sed -i -z "s/database.*homeserver.db//" $DCOMMS_DIR/conf/element/config.json
@ -205,26 +205,33 @@ mastodon_config () {
sudo cp -a $DCOMMS_DIR/conf/mastodon/example.env.production $DCOMMS_DIR/conf/mastodon/env.production sudo cp -a $DCOMMS_DIR/conf/mastodon/example.env.production $DCOMMS_DIR/conf/mastodon/env.production
SECRET_KEY_BASE=`sudo docker run -it --rm \ SECRET_KEY_BASE=`sudo docker run -it --rm \
--mount type=volume,src=masto_data_tmp,dst=/opt/mastodon \ --mount type=volume,src=masto_data_tmp,dst=/opt/mastodon \
-e RUBYOPT=-W0 tootsuite/mastodon:v4.2.9 \ -e RUBYOPT=-W0 tootsuite/mastodon:v4.3.2 \
bundle exec rake secret` >/dev/null bundle exec rake secret` >/dev/null
OTP_SECRET=$(sudo docker run -it --rm \ OTP_SECRET=$(sudo docker run -it --rm \
--mount type=volume,src=masto_data_tmp,dst=/opt/mastodon \ --mount type=volume,src=masto_data_tmp,dst=/opt/mastodon \
-e RUBYOPT=-W0 tootsuite/mastodon:v4.2.9 \ -e RUBYOPT=-W0 tootsuite/mastodon:v4.3.2 \
bundle exec rake secret) >/dev/null bundle exec rake secret) >/dev/null
VAPID_KEYS=$(sudo docker run -it --rm \ VAPID_KEYS=$(sudo docker run -it --rm \
--mount type=volume,src=masto_data_tmp,dst=/opt/mastodon \ --mount type=volume,src=masto_data_tmp,dst=/opt/mastodon \
-e RUBYOPT=-W0 tootsuite/mastodon:v4.2.9 \ -e RUBYOPT=-W0 tootsuite/mastodon:v4.3.2 \
bundle exec rake mastodon:webpush:generate_vapid_key)>/dev/null bundle exec rake mastodon:webpush:generate_vapid_key)>/dev/null
VAPID_FRIENDLY_KEYS=${VAPID_KEYS//$'\n'/\\$'\n'} VAPID_FRIENDLY_KEYS=${VAPID_KEYS//$'\n'/\\$'\n'}
ACTIVE_RECORD_ENCRYPTION=$(sudo docker run -it --rm \
--mount type=volume,src=masto_data_tmp,dst=/opt/mastodon \
-e RUBYOPT=-W0 tootsuite/mastodon:v4.3.2 \
bundle exec rake db:encryption:init)>/dev/null
ACTIVE_RECORD_ENCRYPTION_FRIENDLY_KEYS=${ACTIVE_RECORD_ENCRYPTION//$'\n'/\\$'\n'}
#REDIS_PW=$(openssl rand -base64 12) #REDIS_PW=$(openssl rand -base64 12)
sed -i "s/REPLACEME/$DWEB_DOMAIN/" $DCOMMS_DIR/conf/mastodon/env.production sed -i "s/REPLACEME/$DWEB_DOMAIN/" $DCOMMS_DIR/conf/mastodon/env.production
sed -i "s/SECRET_KEY_BASE=/&$SECRET_KEY_BASE/" $DCOMMS_DIR/conf/mastodon/env.production sed -i "s/SECRET_KEY_BASE=/&$SECRET_KEY_BASE/" $DCOMMS_DIR/conf/mastodon/env.production
sed -i "s/OTP_SECRET=/&$OTP_SECRET/" $DCOMMS_DIR/conf/mastodon/env.production sed -i "s/OTP_SECRET=/&$OTP_SECRET/" $DCOMMS_DIR/conf/mastodon/env.production
sed -i "s/VAPID_KEYS=/$VAPID_FRIENDLY_KEYS/" $DCOMMS_DIR/conf/mastodon/env.production sed -i "s/VAPID_KEYS=/$VAPID_FRIENDLY_KEYS/" $DCOMMS_DIR/conf/mastodon/env.production
sed -i "s/ACTIVE_RECORD=/$ACTIVE_RECORD_ENCRYPTION_FRIENDLY_KEYS/" $DCOMMS_DIR/conf/mastodon/env.production
sed -i 's/\r$//g' $DCOMMS_DIR/conf/mastodon/env.production sed -i 's/\r$//g' $DCOMMS_DIR/conf/mastodon/env.production
sed -i "s/ALTERNATE_DOMAINS=social./&$DWEB_ONION/" $DCOMMS_DIR/conf/mastodon/env.production sed -i "s/ALTERNATE_DOMAINS=social./&$DWEB_ONION/" $DCOMMS_DIR/conf/mastodon/env.production
sed -i "s/SMTP_SERVER=/&$DWEB_DOMAIN/" $DCOMMS_DIR/conf/mastodon/env.production sed -i "s/SMTP_SERVER=/&$DWEB_DOMAIN/" $DCOMMS_DIR/conf/mastodon/env.production
@ -333,7 +340,7 @@ main() {
DELTA=true DELTA=true
;; ;;
"2") "2")
D_IMAGES+=("vectorim/element-web:v1.11.40" "matrixdotorg/synapse:v1.110.0") D_IMAGES+=("vectorim/element-web:v1.11.88" "matrixdotorg/synapse:v1.121.1")
FILES+=("synapse_v1.80.0.tar" "element-web_v1.11.26.tar") FILES+=("synapse_v1.80.0.tar" "element-web_v1.11.26.tar")
FILE_MAGNETS+=("${MAGNET_LINKS[11]}$MAG_TRACKERS" "${MAGNET_LINKS[6]}$MAG_TRACKERS") FILE_MAGNETS+=("${MAGNET_LINKS[11]}$MAG_TRACKERS" "${MAGNET_LINKS[6]}$MAG_TRACKERS")
COMPOSE_FILES+="-f ./conf/compose/element.docker-compose.yml " COMPOSE_FILES+="-f ./conf/compose/element.docker-compose.yml "
@ -354,7 +361,7 @@ main() {
MAU=true MAU=true
;; ;;
"5") "5")
D_IMAGES+=("tootsuite/mastodon:v4.2.9" "redis:7.0-alpine" "postgres:14-alpine") D_IMAGES+=("tootsuite/mastodon:v4.3.2" "redis:7.0-alpine" "postgres:14-alpine")
FILES+=("mastodon_4.1.2.tar" "postgres_14.tar" "redis_7.0.tar") FILES+=("mastodon_4.1.2.tar" "postgres_14.tar" "redis_7.0.tar")
FILE_MAGNETS+=("${MAGNET_LINKS[7]}$MAG_TRACKERS" "${MAGNET_LINKS[9]}$MAG_TRACKERS" "${MAGNET_LINKS[10]}$MAG_TRACKERS") FILE_MAGNETS+=("${MAGNET_LINKS[7]}$MAG_TRACKERS" "${MAGNET_LINKS[9]}$MAG_TRACKERS" "${MAGNET_LINKS[10]}$MAG_TRACKERS")
COMPOSE_FILES+="-f ./conf/compose/mastodon.docker-compose.yml " COMPOSE_FILES+="-f ./conf/compose/mastodon.docker-compose.yml "