about summary refs log tree commit diff
path: root/Dockerfile
diff options
context:
space:
mode:
authorKevin Liu <kevin@potatofrom.space>2018-07-14 19:19:09 -0400
committerEugen Rochko <eugen@zeonfederated.com>2018-07-15 01:19:09 +0200
commit68cccb00ef30516396a64af1a7019baa6c36913c (patch)
treed4ae17ba6011eb7fd9766b65c47f987f4df06c67 /Dockerfile
parent955d5d36e80259d8c10a0246d359f35f63de059d (diff)
Dockerfile: run asset precompilation as a build step (#7780)
* Dockerfile: run asset precompilation as a build step

* Replace OTP_SECRET and SECRET_KEY_BASE with placeholders
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 0c347a11a..b85d05047 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -77,8 +77,10 @@ COPY . /mastodon
 
 RUN chown -R mastodon:mastodon /mastodon
 
-VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs
+VOLUME /mastodon/public/system
 
 USER mastodon
 
+RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder bundle exec rails assets:precompile
+
 ENTRYPOINT ["/sbin/tini", "--"]