generated from coop-cloud/example
Compare commits
8 Commits
1.0.5+v4.3
...
main
Author | SHA1 | Date | |
---|---|---|---|
52a0626ec8 | |||
c05f3c615a | |||
c2df07e146 | |||
f40559dcf0 | |||
ba632b7d61 | |||
d79abf04ad | |||
72f3ac9af4 | |||
6b6fc44d33 |
@ -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!!
|
||||
|
@ -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
13
abra.sh
@ -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 ""
|
||||
|
12
compose.character-limit.yml
Normal file
12
compose.character-limit.yml
Normal 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"'
|
@ -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.5+v4.3.8"
|
||||
- "coop-cloud.${STACK_NAME}.version=1.1.0+v4.3.8"
|
||||
configs: &configs
|
||||
- source: entrypoint_sh
|
||||
target: /usr/local/bin/entrypoint.sh
|
||||
|
@ -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
1
release/1.1.0+v4.3.8
Normal file
@ -0,0 +1 @@
|
||||
MAX_CHARS now supported; see ~/.abra/recipes/.env.sample
|
Loading…
x
Reference in New Issue
Block a user