Compare commits

...

9 Commits

Author SHA1 Message Date
52a0626ec8 Merge pull request 'remove old setup script' (#17) from benjaminlyng/mastodon:chore/remove_old_setup_script into main
Some checks failed
continuous-integration/drone/push Build is failing
Reviewed-on: #17
Reviewed-by: decentral1se <decentral1se@noreply.git.coopcloud.tech>
2025-06-09 10:31:07 +00:00
c05f3c615a remove old setup script
Some checks failed
continuous-integration/drone/pr Build is failing
2025-06-09 06:18:34 +02:00
3wc
c2df07e146 chore: publish 1.1.0+v4.3.8 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2025-06-07 19:08:19 +01:00
3wc
f40559dcf0 Run rake db:migrate during startup
Some checks failed
continuous-integration/drone/push Build is failing
Fixes #15
2025-06-07 19:04:19 +01:00
3wc
ba632b7d61 Also approve accounts when creating with admin() 2025-06-07 19:01:03 +01:00
3wc
d79abf04ad Add MAX_CHARS 🎉 2025-06-07 19:00:40 +01:00
3wc
72f3ac9af4 Fix admin account creation instructions
Some checks failed
continuous-integration/drone/push Build is failing
2025-05-27 19:09:59 +02:00
3wc
6b6fc44d33 Update MASTO_VERSION in abra.sh 2025-05-27 18:53:43 +02:00
3wc
b23d6f874e chore: publish 1.0.5+v4.3.8 release
Some checks failed
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is failing
2025-05-08 13:05:26 +02:00
7 changed files with 28 additions and 15 deletions

View File

@ -15,6 +15,10 @@ LETS_ENCRYPT_ENV=production
COMPOSE_FILE="compose.yml"
# Set the maximum length for toots (posts). Longer posts from other servers will still be displayed, this limit only applies to users on this instance.
#MAX_CHARS=500
#COMPOSE_FILE="$COMPOSE_FILE:compose.character-limit.yml"
# Federation
# ----------
# DO NOT CHANGE DOMAIN VARIABLES AFTER DEPLOYMENT! WILL BREAK FEDERATION!!

View File

@ -26,7 +26,6 @@ the [`abra.sh`](./abra.sh) for more.
1. `abra app secret insert <domain> smtp_password v1 <password>`
1. `abra app config <domain>` (uncomment SMTP details)
1. `abra app deploy <domain>`
1. `abra app cmd <domain> streaming setup`
Then, on your host (outside of the containers), you'll need to fix permissions
for the volume (see [#10](https://git.coopcloud.tech/coop-cloud/mastodon/issues/10)):
@ -38,7 +37,7 @@ chown -R 991:991 /var/lib/docker/volumes/<domain>_app/_data
And finally, within the `app` container, create an admin account:
```
abra app cmd <domain> admin -- <username> <email>
abra app cmd <domain> app admin -- <username> <email>
```
## Tips & tricks

13
abra.sh
View File

@ -1,4 +1,4 @@
export ENTRYPOINT_CONF_VERSION=v5
export ENTRYPOINT_CONF_VERSION=v6
export ENTRYPOINT_STREAMING_CONF_VERSION=v1
grep=grep
@ -57,6 +57,7 @@ admin() {
environment
bin/tootctl accounts create "$1" --email "$2" --confirmed --role Owner
bin/tootctl accounts approve "$1"
}
shell() {
@ -65,18 +66,12 @@ shell() {
bash $@
}
setup() {
environment
RAILS_ENV=production bundle exec rake db:setup
}
secrets() {
set -e
docker context use default > /dev/null 2>&1
MASTO_VERSION="v4.3.1"
MASTO_VERSION="v4.3.8"
echo "Generating secrets for a new Mastodon deployment..."
echo ""
@ -123,7 +118,7 @@ secrets_activerecord() {
docker context use default > /dev/null 2>&1
MASTO_VERSION="v4.3.1"
MASTO_VERSION="v4.3.8"
echo "Generating activerecord secrets for an updated deployment"
echo ""

View File

@ -0,0 +1,12 @@
---
version: "3.8"
services:
app:
environment:
- MAX_CHARS
# NOTE: See [0] for background on why this is necessary
# [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 && RAILS_ENV=production && rm -f /mastodon/tmp/pids/server.pid && su -c "bundle exec rails s -p 3000"'

View File

@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: tootsuite/mastodon:v4.3.7
image: tootsuite/mastodon:v4.3.8
command: |
bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
networks: &bothNetworks
@ -20,7 +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=1.0.4+v4.3.7"
- "coop-cloud.${STACK_NAME}.version=1.1.0+v4.3.8"
configs: &configs
- source: entrypoint_sh
target: /usr/local/bin/entrypoint.sh
@ -129,7 +129,7 @@ services:
- WEB_DOMAIN
streaming:
image: tootsuite/mastodon-streaming:v4.3.7
image: tootsuite/mastodon-streaming:v4.3.8
command: node ./streaming/index.js
configs: *configs
entrypoint: /usr/local/bin/entrypoint_streaming.sh
@ -150,7 +150,7 @@ services:
volumes: *appVolume
sidekiq:
image: tootsuite/mastodon:v4.3.7
image: tootsuite/mastodon:v4.3.8
secrets: *secrets
command: bundle exec sidekiq
configs: *configs

View File

@ -40,4 +40,6 @@ file_env "OIDC_CLIENT_SECRET"
# NOTE: this was working in mastodon 4.2 but breaks in 4.3
# sed -i '/- admin$/d' /opt/mastodon/config/settings.yml
RAILS_ENV=production bundle exec rake db:migrate
/usr/bin/tini -s -- "$@"

1
release/1.1.0+v4.3.8 Normal file
View File

@ -0,0 +1 @@
MAX_CHARS now supported; see ~/.abra/recipes/.env.sample