jonashellmann / everydocs-core

A simple Document Management System for private use with basic functionality to organize your documents digitally
GNU General Public License v3.0
218 stars 15 forks source link

Docker install not starting #25

Closed jase64 closed 9 months ago

jase64 commented 9 months ago

Hi,

I tried to test Everydocs in a VM with the docker install command line, but connection to MySQL container couldn't been established. So all went down.

Did I miss something?

sja@debian:~/everydocs$ sudo docker run -p 127.0.0.1:8080:5678/tcp -e SECRET_KEY_BASE="$(openssl rand -hex 64)" -v /data/everydocs:/var/everydocs-files jonashellmann/everydocs
DEPRECATION WARNING: Support for `config.active_support.cache_format_version = 6.1` has been deprecated and will be removed in Rails 7.2.

Check the Rails upgrade guide at https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#new-activesupport-cache-serialization-format
for more information on how to upgrade.
 (called from <top (required)> at /usr/src/app/config/environment.rb:5)
rake aborted!
ActiveRecord::ConnectionNotEstablished: Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:46:in `rescue in new_client'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:35:in `new_client'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:159:in `connect'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:167:in `reconnect'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:685:in `block in reconnect!'
/usr/local/bundle/gems/activesupport-7.1.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:684:in `reconnect!'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:788:in `verify!'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:795:in `connect!'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:997:in `block in with_raw_connection'
/usr/local/bundle/gems/activesupport-7.1.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:996:in `with_raw_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:1104:in `valid_raw_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:1091:in `any_raw_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:181:in `get_full_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:87:in `get_database_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/schema_cache.rb:374:in `database_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/schema_cache.rb:70:in `database_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/schema_cache.rb:200:in `database_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:871:in `database_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:657:in `check_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:675:in `new_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:720:in `checkout_new_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:699:in `try_to_checkout_new_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:657:in `acquire_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_handler.rb:246:in `retrieve_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_handling.rb:287:in `retrieve_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_handling.rb:254:in `connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/tasks/database_tasks.rb:510:in `migration_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/tasks/database_tasks.rb:243:in `migrate'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/railties/databases.rake:93:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'

Caused by:
Mysql2::Error::ConnectionError: Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
/usr/local/bundle/gems/mysql2-0.5.5/lib/mysql2/client.rb:97:in `connect'
/usr/local/bundle/gems/mysql2-0.5.5/lib/mysql2/client.rb:97:in `initialize'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:36:in `new'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:36:in `new_client'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:159:in `connect'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:167:in `reconnect'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:685:in `block in reconnect!'
/usr/local/bundle/gems/activesupport-7.1.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:684:in `reconnect!'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:788:in `verify!'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:795:in `connect!'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:997:in `block in with_raw_connection'
/usr/local/bundle/gems/activesupport-7.1.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:996:in `with_raw_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:1104:in `valid_raw_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:1091:in `any_raw_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/mysql2_adapter.rb:181:in `get_full_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:87:in `get_database_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/schema_cache.rb:374:in `database_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/schema_cache.rb:70:in `database_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/schema_cache.rb:200:in `database_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_adapter.rb:871:in `database_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:657:in `check_version'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:675:in `new_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:720:in `checkout_new_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:699:in `try_to_checkout_new_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:657:in `acquire_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_adapters/abstract/connection_handler.rb:246:in `retrieve_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_handling.rb:287:in `retrieve_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/connection_handling.rb:254:in `connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/tasks/database_tasks.rb:510:in `migration_connection'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/tasks/database_tasks.rb:243:in `migrate'
/usr/local/bundle/gems/activerecord-7.1.1/lib/active_record/railties/databases.rake:93:in `block (2 levels) in <top (required)>'
/usr/local/bundle/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate
jonashellmann commented 9 months ago

Sorry that I'm seeing this issue only now. Do you have a database available at localhost port 3306 with the default database, username and password? If not, no database connection can be established which is needed for the application to run. You need to add the changed values for the environment variables (see https://docs.docker.com/engine/reference/commandline/container_run/#env). These are listed underneath the command in the README.