Skip to content
Snippets Groups Projects
Verified Commit aad36d72 authored by Pascal Ernster's avatar Pascal Ernster :mask:
Browse files

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`.
parent 237a70bd
No related branches found
Tags v0.3.5
1 merge request!125Create assets on first run in production mode
Pipeline #6680 failed
......@@ -11,6 +11,14 @@ else
bundle check || bundle install --without production
fi
if [ ! -f "/data/yarn.lock" ]; then
yarn install
fi
if [ ! -d "/data/public/uv" ]; then
bundle exec rake assets:clean assets:precompile
fi
## Run any pending migrations, if the database exists
## If not setup the database
bundle exec rake db:exists && bundle exec rake db:migrate || bundle exec rake db:setup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment