Precompiling Assets When Building #44
Unanswered
partydrone
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Hi, I vaguely remember this being an issue with Rails 5. I'm almost sure I was able to set |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm using your Dockerfile as a starting point for a Rails 5 project. I'm running into problems when the build gets to the assets:precompile step—it's trying to connect to the database and fails. I tried setting
config.assets.initialize_on_precompile = false
, but that didn't resolve the issue.When the database host is missing, or set to "localhost," Rails tries connecting to the database via socket. If I add the host as part of the precompile command (
MYSQL_HOST=db SECRET_KEY_BASE=dummyvalue rails assets:precompile
), then it doesn't like the host ("Unknown MySQL server host 'db').Have you ever run into this issue on your projects using this Dockerfile?
Beta Was this translation helpful? Give feedback.
All reactions