move precompilation to image runtime instead of image build
This commit is contained in:
parent
72a9dc7d78
commit
6eb1523991
@ -23,7 +23,3 @@ bundle install \
|
||||
-j$(getconf _NPROCESSORS_ONLN) \
|
||||
--deployment --without development test
|
||||
yarn install --pure-lockfile --ignore-engines
|
||||
|
||||
OTP_SECRET=precompile_placeholder \
|
||||
SECRET_KEY_BASE=precompile_placeholder \
|
||||
bundle exec rails assets:precompile
|
||||
|
@ -7,7 +7,46 @@ done
|
||||
|
||||
echo "web starting..."
|
||||
|
||||
|
||||
rm -rf \
|
||||
/mastodon/app/public/system \
|
||||
/mastodon/app/public/assets \
|
||||
/mastodon/app/public/packs \
|
||||
/mastodon/log
|
||||
|
||||
if [[ ! -d /state/mastodon/system ]]; then
|
||||
mkdir -p /state/mastodon/system
|
||||
fi
|
||||
|
||||
if [[ ! -d /state/mastodon/assets ]]; then
|
||||
mkdir -p /state/mastodon/assets
|
||||
fi
|
||||
|
||||
if [[ ! -d /state/mastodon/packs ]]; then
|
||||
mkdir -p /state/mastodon/packs
|
||||
fi
|
||||
|
||||
if [[ ! -d /state/mastodon/log ]]; then
|
||||
mkdir -p /state/mastodon/log
|
||||
fi
|
||||
|
||||
chown mastodon:mastodon /state/mastodon /state/mastodon/*
|
||||
|
||||
ln -s /state/mastodon/system /mastodon/app/public/system
|
||||
ln -s /state/mastodon/assets /mastodon/app/public/assets
|
||||
ln -s /state/mastodon/packs /mastodon/app/public/packs
|
||||
ln -s /state/mastodon/log /mastodon/app/log
|
||||
|
||||
cd /mastodon/app
|
||||
|
||||
envdir /state/envdir \
|
||||
chpst -u mastodon:mastodon \
|
||||
bash -i -c "
|
||||
OTP_SECRET=precompile_placeholder
|
||||
SECRET_KEY_BASE=precompile_placeholder
|
||||
bundle exec rails assets:precompile
|
||||
"
|
||||
|
||||
exec \
|
||||
envdir /state/envdir \
|
||||
chpst -u mastodon:mastodon \
|
||||
|
Loading…
Reference in New Issue
Block a user