Browse Source

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
Kevin Liu 5 months ago
parent
commit
68cccb00ef
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      Dockerfile

+ 3
- 1
Dockerfile View File

@@ -77,8 +77,10 @@ COPY . /mastodon
77 77
 
78 78
 RUN chown -R mastodon:mastodon /mastodon
79 79
 
80
-VOLUME /mastodon/public/system /mastodon/public/assets /mastodon/public/packs
80
+VOLUME /mastodon/public/system
81 81
 
82 82
 USER mastodon
83 83
 
84
+RUN OTP_SECRET=precompile_placeholder SECRET_KEY_BASE=precompile_placeholder bundle exec rails assets:precompile
85
+
84 86
 ENTRYPOINT ["/sbin/tini", "--"]