Create assets on first run in production mode
Currently, starting RDMS after rebuilding and reinstalling it from
scratch in RAILS_ENV=production
mode fails because assets are not
created automatically. I'd prefer to put the required commands into the
Dockerfile
, but this doesn't work currently because the path used to
store these assets is a Docker volume shared between multiple Docker
containers, which are not available at build time of these container
images/execution time of the corresponding Dockerfile
. Therefore, for
the time being, we execute the commands in the container's
hyrax/docker-entrypoint.sh
.
Closes #34 (closed)
Merge request reports
Activity
requested review from @anusha
assigned to @ernstprr
added 5 commits
-
2660d970...237a70bd - 4 commits from branch
develop
- aad36d72 - Create assets on first run in production mode
-
2660d970...237a70bd - 4 commits from branch
added 1 commit
- eb66b864 - Pre-compile assets only needed for production
@ernstprr I moved the check for pre-compile assets for just production environment as RAILS works differently in development mode. This commit will support both production and development modes and I tested locally in development mode and in Cottage Labs instance in production mode.
If you are happy with the change, this is ready to be merged.
Edited by Anusha Ranganathanmentioned in commit 1d038755