commit:88705935ba15db9d3438a4179e604792fc3fd2bc
author:Chip Black
committer:Chip Black
date:Fri Dec 30 03:20:04 2022 -0600
parents:c93cd07b27ebbeea242436f8d114521b613666c0
Add external media mount
diff --git a/build-mastodon.sh b/build-mastodon.sh
line changes: +4/-0
index cf75223..c2b0de5
--- a/build-mastodon.sh
+++ b/build-mastodon.sh
@@ -44,6 +44,10 @@ bastille cp $JAILNAME env.production /home/mastodon/live/.env.production
 rm env.production
 
 jexec -U mastodon $JAILNAME /bin/sh -c 'cd ~/live && RAILS_ENV=production bundle exec rails assets:precompile'
+
+bastille mount $JAILNAME $MEDIA_MOUNT usr/home/mastodon/live/public/system nullfs rw 0 0
+jexec $JAILNAME /usr/sbin/chown mastodon:mastodon /home/mastodon/live/public/system
+
 bastille cp $JAILNAME rc.d /usr/local/etc/
 bastille sysrc $JAILNAME mastodon_enable=YES
 bastille service $JAILNAME mastodon-streaming start

diff --git a/main-env.opts b/main-env.opts
line changes: +2/-0
index 245cc11..ad03737
--- a/main-env.opts
+++ b/main-env.opts
@@ -6,6 +6,8 @@ MASTODON_JAILNAME=mastodon
 MASTODON_ADDR=10.0.1.3
 HOSTNAME=awesome.garden
 
+MEDIA_MOUNT=/mastodon-media
+
 # Secrets
 SECRET_KEY_BASE=ebbdf56ea127cc6bdb74cbe6c692d7d9fa646bdf4128e1a517ce77907abd08b90ead57b86f1b193106c43c1832a8983346dd096eb1d5b908dd57acb3463a1d46
 OTP_SECRET=903dad54615b2618c2f737149504b93a0e46e0bac7bdb46eb489ea25151397403164859463df697792f935cf827bcbaa53c7b95dff84e2d5bf26d795f765f33b