Compare commits

..
Author SHA1 Message Date
3wordchant 3c6dd60fda chore: publish 3.0.12+v4.5.23 release
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2026-12-02 12:00:25 -05:00
3wordchant 2c4eb7d534 chore: update image tags 2026-12-02 12:00:13 -05:00
3wordchant 2577a92c50 Merge pull request 'fix: run Mastodon app as mastodon user with character limit override' (#64) from escuela-comun/mastodon:fix/character-limit-run-as-mastodon into main
continuous-integration/drone/push Build is failing
Reviewed-on: #64
2026-11-27 03:12:39 +00:00
3wordchant 4c95890dc2 Merge branch 'main' into fix/character-limit-run-as-mastodon
continuous-integration/drone/pr Build is failing
2026-11-27 03:12:30 +00:00
3wordchant 6d693f8e3f Merge pull request 'make db_password secret generation non-interactive' (#58) from Numerica/mastodon:non-interactive into main
continuous-integration/drone/push Build is failing
Reviewed-on: #58
Reviewed-by: 3wordchant <3+3wordchant@noreply.git.coopcloud.tech>
2026-11-26 23:45:00 +00:00
ChasquiLabo 9823a22e55 fix: run Mastodon app as mastodon user with character limit override
continuous-integration/drone/pr Build is failing
2026-09-29 18:27:35 +00:00
Roberto Soto d8a02a3091 intentando que no sea interactivo
continuous-integration/drone/pr Build is failing
2026-05-19 13:27:59 -04:00
5 changed files with 6 additions and 115 deletions
-3
View File
@@ -203,6 +203,3 @@ DEFAULT_LOCALE=en
# OMNIAUTH_ONLY=true
# ONE_CLICK_SSO_LOGIN=true
# SECRET_OIDC_CLIENT_SECRET_VERSION=v1
# Backup Bot Two
ENABLE_BACKUPS=true
+1 -3
View File
@@ -113,7 +113,7 @@ secrets() {
echo "VAPID_PRIVATE_KEY = $VAPID_PRIVATE_KEY"
echo ""
abra app secret generate "$APP_NAME" db_password v1
abra app secret generate "$APP_NAME" db_password v1 -n
echo ""
echo "don't forget to insert your smtp_password! your deployment won't work without it"
@@ -155,5 +155,3 @@ secrets_activerecord() {
rm -rf /tmp/activerecord.txt
}
export PG_BACKUP_VERSION=v1
+1 -1
View File
@@ -9,4 +9,4 @@ services:
# [0]: See https://github.com/mastodon/mastodon/pull/30091
user: root
command: >
/bin/sh -c 'set -x && ls && sed -i -e "s/500/$MAX_CHARS/g" app/javascript/mastodon/features/compose/components/compose_form.jsx && sed -i -e "s/500/$MAX_CHARS/g" app/validators/status_length_validator.rb && rm -f /mastodon/tmp/pids/server.pid && su -c "RAILS_ENV=production bundle exec rails s -p 3000"'
/bin/sh -c 'set -x && ls && sed -i -e "s/500/$MAX_CHARS/g" app/javascript/mastodon/features/compose/components/compose_form.jsx && sed -i -e "s/500/$MAX_CHARS/g" app/validators/status_length_validator.rb && rm -f /mastodon/tmp/pids/server.pid && exec su -s /bin/sh -c "RAILS_ENV=production bundle exec rails s -p 3000" mastodon'
+4 -18
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: tootsuite/mastodon:v4.5.22
image: tootsuite/mastodon:v4.5.23
command: |
bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
networks: &bothNetworks
@@ -20,9 +20,7 @@ services:
- "traefik.http.routers.${STACK_NAME}_web.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}_web.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}_web.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "coop-cloud.${STACK_NAME}.version=3.0.11+v4.5.22"
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
- "backupbot.backup.volumes.redis=false"
- "coop-cloud.${STACK_NAME}.version=3.0.12+v4.5.23"
configs: &configs
- source: entrypoint_conf
target: /usr/local/bin/entrypoint.sh
@@ -131,7 +129,7 @@ services:
- WEB_DOMAIN
streaming:
image: tootsuite/mastodon-streaming:v4.5.22
image: tootsuite/mastodon-streaming:v4.5.23
command: node ./streaming/index.js
configs: *configs
entrypoint: /usr/local/bin/entrypoint_streaming.sh
@@ -152,7 +150,7 @@ services:
volumes: *appVolume
sidekiq:
image: tootsuite/mastodon:v4.5.22
image: tootsuite/mastodon:v4.5.23
secrets: *secrets
command: bundle exec sidekiq
configs: *configs
@@ -171,15 +169,6 @@ services:
- internal
volumes:
- postgres:/var/lib/postgresql
configs:
- source: pg_backup
target: /pg_backup.sh
mode: 0555
deploy:
labels:
- "backupbot.backup.pre-hook=/pg_backup.sh backup"
- "backupbot.backup.volumes.postgres.path=backup.sql"
- "backupbot.restore.post-hook=/pg_backup.sh restore"
secrets:
- db_password
@@ -233,9 +222,6 @@ networks:
external: true
configs:
pg_backup:
name: ${STACK_NAME}_pg_backup_${PG_BACKUP_VERSION}
file: pg_backup.sh
entrypoint_conf:
name: ${STACK_NAME}_entrypoint_conf_${ENTRYPOINT_CONF_VERSION}
file: entrypoint.sh.tmpl
-90
View File
@@ -1,90 +0,0 @@
#!/bin/bash
set -Eeuo pipefail
BACKUP_FILE="/var/lib/postgresql/backup.sql"
TMP_BACKUP_FILE="${BACKUP_FILE}.tmp"
export PGPASSWORD="$(cat "$POSTGRES_PASSWORD_FILE")"
backup() {
rm -f "$TMP_BACKUP_FILE"
pg_dump \
-U "$POSTGRES_USER" \
"$POSTGRES_DB" \
> "$TMP_BACKUP_FILE"
mv "$TMP_BACKUP_FILE" "$BACKUP_FILE"
chmod 600 "$BACKUP_FILE"
}
restore() {
[ -s "$BACKUP_FILE" ] || exit 1
HBA_FILE="$(
psql \
-U "$POSTGRES_USER" \
-d postgres \
-Atc "SHOW hba_file;"
)"
HBA_BACKUP="$(mktemp /tmp/pg_hba.backupbot.XXXXXX)"
restore_hba() {
if [ -f "$HBA_BACKUP" ]; then
cat "$HBA_BACKUP" > "$HBA_FILE"
psql \
-U "$POSTGRES_USER" \
-d postgres \
-c "SELECT pg_reload_conf();" \
>/dev/null
rm -f "$HBA_BACKUP"
fi
}
cp "$HBA_FILE" "$HBA_BACKUP"
trap restore_hba EXIT INT TERM
printf 'local all all trust\n' > "$HBA_FILE"
psql \
-U "$POSTGRES_USER" \
-d postgres \
-c "SELECT pg_reload_conf();" \
>/dev/null
dropdb \
--force \
-U "$POSTGRES_USER" \
"$POSTGRES_DB"
createdb \
-U "$POSTGRES_USER" \
"$POSTGRES_DB"
psql \
-v ON_ERROR_STOP=1 \
-U "$POSTGRES_USER" \
-d "$POSTGRES_DB" \
-1 \
-f "$BACKUP_FILE"
trap - EXIT INT TERM
restore_hba
}
case "${1:-}" in
backup)
backup
;;
restore)
restore
;;
*)
exit 1
;;
esac