-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some issue while dockerizing the application #15
Comments
this seems to be specific case when trying to run the rails app in production mode. Do we have any guide on how to set this up for production use case. |
Hi @yalamber This project is still a pretty young thing, at just v0.2. It's a rewrite, as a GeoBlacklight plugin, of the Big Ten Academic Alliance's production GeoBlacklight management application: GEOMG. We're not running GBL Admin in production for the BTAA just yet, but hopefully soon. I'll try to write up some documentation about running this in production-mode this week. Very happy to have another developer testing the project out. Please keep the feedback coming. Cheers! |
Hello @ewlarson, Dockerfile
and entrypoint.sh
|
Hi again @yalamber Outside of Docker, but just running the application in production mode on my local machine, I was able to replicate the error you encountered. I resolved it locally via these steps. # Replicated Error
# uninitialized constant Blacklight::SavedSearches (NameError)
# Remove the misbehaving controller -- This controller was removed from Blacklight
rm app/controllers/saved_searches_controller.rb
# Create a dotenv file for production
# Update your database connection settings as necessary
cp .env.development .env.production
# Migrate the database
RAILS_ENV=production bundle exec rake db:migrate
# Seed the database
RAILS_ENV=production bundle exec rake db:seed
# Precompile assets
RAILS_ENV=production rails assets:precompile
# Serve local assets (just for running app locally in production mode)
# In .env.production, add:
# Rails serve local assets
RAILS_SERVE_STATIC_FILES=true
RAILS_ENV=production bundle exec rake gbl_admin:server
# App runs and works as expected |
hello @ewlarson |
Hi again! AttrJson (attr_json) is the library Kithe uses for JSON attributes. I think what's happening here is your database has been seeded twice (or more), so the same attribute (dct_title_s) is in the Elements table more than once: "conflict with existing attribute name dct_title_s". Hope that makes sense! Really, the code should have a unique key guard against the same attribute being loaded twice. I'll make an issue for that. |
I see you have created new issue for this. Thank you closing this issue. |
I am trying to dockerize this application to make it easier for me to deploy.
'But when I run docker compose up
I receive following error
/app/app/controllers/saved_searches_controller.rb:3:in
<class:SavedSearchesController>': uninitialized constant Blacklight::SavedSearches (NameError) gbl_admin_mutant-web-1 | gbl_admin_mutant-web-1 | include Blacklight::SavedSearches gbl_admin_mutant-web-1 | ^^^^^^^^^^^^^^^ gbl_admin_mutant-web-1 | Did you mean? SavedSearchesController gbl_admin_mutant-web-1 | from /app/app/controllers/saved_searches_controller.rb:2:in
seems like issue related to this projectblacklight/blacklight_advanced_search#105
But I am not sure why it's only having issue while running inside docker container.
The text was updated successfully, but these errors were encountered: