orumin / enju_leaf Goto Github PK
View Code? Open in Web Editor NEWProject-L Enju Leaf (https://github.com/next-l/enju_leaf) を円滑に運用するための Docker イメージ
Home Page: https://hub.docker.com/r/orumin/enju_leaf
License: MIT License
Project-L Enju Leaf (https://github.com/next-l/enju_leaf) を円滑に運用するための Docker イメージ
Home Page: https://hub.docker.com/r/orumin/enju_leaf
License: MIT License
README中のデータベースの初期設定において
docker-compose run --rm web bundle exec rake enju_leaf:setup
を実行すると失敗する。
RSolr::Error::ConnectionRefused: Connection refused - {:data=>"[{"id":"Shelf 1","type":["Shelf","ApplicationRecord","ActiveRecord::Base"],"class_name":"Shelf","shelf_name_s":"web","library_s":"web","position_i":"1","name_text":["web","web","ja: web","World Wide Web"]}]", :headers=>{"Content-Type"=>"application/json"}, :method=>:post, :params=>{:wt=>:json}, :query=>"wt=json", :path=>"update", :uri=>#<URI::HTTP http://solr:8983/solr/default/update?wt=json>}
Caused by:
Faraday::ConnectionFailed: Failed to open TCP connection to solr:8983 (getaddrinfo: Name does not resolve)
等となっており、Solrとの通信が必要だったことがわかる。
export DB_USER=enju_leaf DB_NAME=enju_leaf_production DB_PASS=admin # .env.production に合わせる
docker-compose up -d db \
&& sleep 10 \
&& docker-compose exec -u postgres db sh -c "echo create user ${DB_USER} with password \'${DB_PASS}\' createdb\; | psql -f -" \
&& docker-compose exec -u postgres db createdb -U ${DB_USER} ${DB_NAME}
docker-compose up -d solr # <- new
docker-compose run --rm web bundle exec rake db:migrate
docker-compose run --rm web bundle exec rake enju_leaf:setup
docker-compose run --rm web bundle exec rake enju_circulation:setup
docker-compose run --rm web bundle exec rake enju_subject:setup
docker-compose run --rm web bundle exec rake db:seed
READMEにある手順
export DB_USER=enju_leaf DB_NAME=enju_leaf_production DB_PASS=admin # .env.production に合わせる
docker-compose up -d db \
&& sleep 10 \
&& docker-compose exec -u postgres db sh -c "echo create user ${DB_USER} with password \'${DB_PASS}\' createdb\; | psql -f -" \
&& docker-compose exec -u postgres db createdb -U ${DB_USER} ${DB_NAME}
を実行すると
Error response from daemon: Container *** is restarting, wait until the container is running
となり失敗する。
docker-compose logsによると
db_1 | Error: Database is uninitialized and superuser password is not specified.
db_1 | You must specify POSTGRES_PASSWORD to a non-empty value for the
db_1 | superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
db_1 |
db_1 | You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
db_1 | connections without a password. This is not recommended.
db_1 |
db_1 | See PostgreSQL documentation about "trust":
db_1 | https://www.postgresql.org/docs/current/auth-trust.html
となっているため、一時的にdocker-compose.ymlで
environment:
- POSTGRES_PASSWORD=admin
する等の対応が必要になる。
TSVインポート時にISBNを指定するとexecution_expiredでインポートに失敗する。
docker-compose.yml
でresqueのnetworkにexternal_networkを足したところ解決した。
環境
resqueに出ていたエラーの詳細
Exception: Net::OpenTimeout
Error: execution expired
/usr/local/lib/ruby/2.6.0/net/http.rb:947:in `initialize'
/usr/local/lib/ruby/2.6.0/net/http.rb:947:in `open'
/usr/local/lib/ruby/2.6.0/net/http.rb:947:in `block in connect'
/usr/local/lib/ruby/2.6.0/timeout.rb:103:in `timeout'
/usr/local/lib/ruby/2.6.0/net/http.rb:945:in `connect'
/usr/local/lib/ruby/2.6.0/net/http.rb:930:in `do_start'
/usr/local/lib/ruby/2.6.0/net/http.rb:919:in `start'
/usr/local/lib/ruby/2.6.0/open-uri.rb:337:in `open_http'
/usr/local/lib/ruby/2.6.0/open-uri.rb:756:in `buffer_open'
/usr/local/lib/ruby/2.6.0/open-uri.rb:226:in `block in open_loop'
/usr/local/lib/ruby/2.6.0/open-uri.rb:224:in `catch'
/usr/local/lib/ruby/2.6.0/open-uri.rb:224:in `open_loop'
/usr/local/lib/ruby/2.6.0/open-uri.rb:165:in `open_uri'
/usr/local/lib/ruby/2.6.0/open-uri.rb:736:in `open'
/usr/local/lib/ruby/2.6.0/open-uri.rb:744:in `read'
/usr/local/lib/ruby/2.6.0/rss/parser.rb:122:in `normalize_rss'
/usr/local/lib/ruby/2.6.0/rss/parser.rb:108:in `initialize'
/usr/local/lib/ruby/2.6.0/rss/parser.rb:85:in `new'
/usr/local/lib/ruby/2.6.0/rss/parser.rb:85:in `parse'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/enju_ndl-0.3.0/lib/enju_ndl/ndl_search.rb:266:in `search_ndl'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/enju_ndl-0.3.0/lib/enju_ndl/ndl_search.rb:279:in `return_xml'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/enju_ndl-0.3.0/lib/enju_ndl/ndl_search.rb:30:in `import_from_ndl_search'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/enju_ndl-0.3.0/lib/enju_ndl/ndl_search.rb:10:in `import_isbn'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/enju_biblio-0.3.1/app/models/resource_import_file.rb:163:in `block in import'
/usr/local/lib/ruby/2.6.0/csv/parser.rb:699:in `emit_row'
/usr/local/lib/ruby/2.6.0/csv/parser.rb:259:in `parse'
/usr/local/lib/ruby/2.6.0/csv.rb:1171:in `each'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/enju_biblio-0.3.1/app/models/resource_import_file.rb:80:in `import'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/enju_biblio-0.3.1/app/models/resource_import_file.rb:49:in `import_start'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/enju_biblio-0.3.1/app/jobs/resource_import_file_job.rb:5:in `perform'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/execution.rb:37:in `block in perform_now'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/i18n-1.5.3/lib/i18n.rb:284:in `with_locale'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/logging.rb:24:in `block (4 levels) in <module:Logging>'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/notifications.rb:166:in `block in instrument'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/notifications.rb:166:in `instrument'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/logging.rb:23:in `block (3 levels) in <module:Logging>'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/logging.rb:44:in `block in tag_logger'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/tagged_logging.rb:69:in `block in tagged'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/tagged_logging.rb:26:in `tagged'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/tagged_logging.rb:69:in `tagged'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/logging.rb:44:in `tag_logger'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/logging.rb:20:in `block (2 levels) in <module:Logging>'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:135:in `run_callbacks'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/execution.rb:33:in `perform_now'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/execution.rb:22:in `block in execute'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:108:in `block in run_callbacks'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/railtie.rb:26:in `block (4 levels) in <class:Railtie>'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/execution_wrapper.rb:85:in `wrap'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/reloader.rb:68:in `block in wrap'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/execution_wrapper.rb:85:in `wrap'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/reloader.rb:67:in `wrap'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/railtie.rb:25:in `block (3 levels) in <class:Railtie>'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `instance_exec'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activesupport-5.1.6.1/lib/active_support/callbacks.rb:135:in `run_callbacks'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/execution.rb:20:in `execute'
/enju_leaf/vendor/bundle/ruby/2.6.0/gems/activejob-5.1.6.1/lib/active_job/queue_adapters/resque_adapter.rb:45:in `perform'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.