diff options
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Dockerfile b/Dockerfile index 962e5a8c9..742f28d14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -103,13 +103,21 @@ ENV NODE_ENV="production" ENV RAILS_SERVE_STATIC_FILES="true" ENV BIND="0.0.0.0" -# Set the run user USER mastodon +ARG SOURCE_COMMIT +ENV SOURCE_TAG $SOURCE_COMMIT + # Precompile assets -RUN cd ~ && \ - OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder rails assets:precompile && \ - yarn cache clean +RUN cd ~ && OTP_SECRET=_ SECRET_KEY_BASE=_ rails assets:precompile --trace && yarn cache clean + +# Empty temporary files +USER root + +RUN rm -rf /opt/mastodon/tmp/* + +# Set the run user +USER mastodon # Set the work dir and the container entry point WORKDIR /opt/mastodon |