mirror of
https://git.cloudron.io/cloudron/mastodon-app.git
synced 2025-04-29 00:24:44 +00:00
Make Gemfile.lock writable
This commit is contained in:
parent
2169a2bf42
commit
39175bb56d
2 changed files with 10 additions and 6 deletions
14
Dockerfile
14
Dockerfile
|
@ -28,11 +28,15 @@ RUN curl -L https://github.com/tootsuite/mastodon/archive/v${VERSION}.tar.gz | t
|
||||||
RUN SECRET_KEY_BASE=insecure.secret_key_base OTP_SECRET=insecure.otp_secret \
|
RUN SECRET_KEY_BASE=insecure.secret_key_base OTP_SECRET=insecure.otp_secret \
|
||||||
bundle exec rake assets:precompile
|
bundle exec rake assets:precompile
|
||||||
|
|
||||||
|
# https://github.com/rubygems/bundler/issues/5245 means that bundle exec writes to Gemfile.lock
|
||||||
|
RUN ln -fs /run/mastodon/bullet.log /app/code/log/bullet.log && \
|
||||||
|
rm -rf /app/code/tmp && ln -fs /tmp/mastodon /app/code/tmp && \
|
||||||
|
mv /app/code/Gemfile.lock /app/code/Gemfile.lock.original && ln -s /run/mastodon/Gemfile.lock /app/code/Gemfile.lock
|
||||||
|
|
||||||
# add nginx config
|
# add nginx config
|
||||||
USER root
|
RUN rm /etc/nginx/sites-enabled/* && \
|
||||||
RUN rm /etc/nginx/sites-enabled/*
|
ln -sf /dev/stdout /var/log/nginx/access.log && \
|
||||||
RUN ln -sf /dev/stdout /var/log/nginx/access.log
|
ln -sf /dev/stderr /var/log/nginx/error.log
|
||||||
RUN ln -sf /dev/stderr /var/log/nginx/error.log
|
|
||||||
ADD nginx_readonlyrootfs.conf /etc/nginx/conf.d/readonlyrootfs.conf
|
ADD nginx_readonlyrootfs.conf /etc/nginx/conf.d/readonlyrootfs.conf
|
||||||
COPY nginx/mastodon.conf /etc/nginx/sites-available/mastodon
|
COPY nginx/mastodon.conf /etc/nginx/sites-available/mastodon
|
||||||
RUN ln -s /etc/nginx/sites-available/mastodon /etc/nginx/sites-enabled/mastodon
|
RUN ln -s /etc/nginx/sites-available/mastodon /etc/nginx/sites-enabled/mastodon
|
||||||
|
@ -42,9 +46,7 @@ ADD supervisor/* /etc/supervisor/conf.d/
|
||||||
RUN ln -sf /run/mastodon/supervisord.log /var/log/supervisor/supervisord.log
|
RUN ln -sf /run/mastodon/supervisord.log /var/log/supervisor/supervisord.log
|
||||||
|
|
||||||
RUN ln -fs /app/data/env.production /app/code/.env.production
|
RUN ln -fs /app/data/env.production /app/code/.env.production
|
||||||
RUN ln -fs /run/mastodon/bullet.log /app/code/log/bullet.log
|
|
||||||
RUN ln -fs /app/data/system /app/code/public/system
|
RUN ln -fs /app/data/system /app/code/public/system
|
||||||
RUN rm -rf /app/code/tmp && ln -fs /tmp/mastodon /app/code/tmp
|
|
||||||
|
|
||||||
COPY start.sh cleanup.sh env.template /app/pkg/
|
COPY start.sh cleanup.sh env.template /app/pkg/
|
||||||
|
|
||||||
|
|
2
start.sh
2
start.sh
|
@ -42,6 +42,8 @@ else
|
||||||
sed -e "s/LDAP_ENABLED=.*/LDAP_ENABLED=false/g" -i /app/data/env.production
|
sed -e "s/LDAP_ENABLED=.*/LDAP_ENABLED=false/g" -i /app/data/env.production
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -f /run/mastodon/Gemfile.lock && cp /app/code/Gemfile.lock.original /run/mastodon/Gemfile.lock
|
||||||
|
|
||||||
if grep -q "^SECRET_KEY_BASE=$" /app/data/env.production; then
|
if grep -q "^SECRET_KEY_BASE=$" /app/data/env.production; then
|
||||||
echo "==> Generating secrets"
|
echo "==> Generating secrets"
|
||||||
export RANDFILE=/tmp/.rnd
|
export RANDFILE=/tmp/.rnd
|
||||||
|
|
Loading…
Reference in a new issue