Closed ukitazume closed 5 years ago
The error occurs around mounting volume. plz check https://github.com/sitateru/kpt/blob/master/docker-compose.yml#L8
ssh root@172.104.123.98
with the password
Current error:
$ docker-compose run web rake db:create db:migrate
Starting kpt_db_1 ... done
DEPRECATION WARNING: The factory_girl gem is deprecated. Please upgrade to factory_bot. See https://github.com/thoughtbot/factory_bot/blob/v4.9.0/UPGRADE_FROM_FACTORY_GIRL.md for further instructions. (called from require at /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.6/lib/bundler/runtime.rb:81)
could not translate host name "db" to address: Name does not resolve
Couldn't create 'kpt_development' database. Please check your configuration.
rake aborted!
PG::ConnectionBad: could not translate host name "db" to address: Name does not resolve
/usr/local/bundle/gems/pg-1.1.4/lib/pg.rb:56:in initialize' /usr/local/bundle/gems/pg-1.1.4/lib/pg.rb:56:in
new'
/usr/local/bundle/gems/pg-1.1.4/lib/pg.rb:56:in connect' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:692:in
connect'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:223:in initialize' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in
new'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:48:in postgresql_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:811:in
new_connection'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:855:in checkout_new_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:834:in
try_to_checkout_new_connection'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:795:in acquire_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:523:in
checkout'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:382:in connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:1010:in
retrieve_connection'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_handling.rb:118:in retrieve_connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/connection_handling.rb:90:in
connection'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/postgresql_database_tasks.rb:12:in connection' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/postgresql_database_tasks.rb:21:in
create'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:119:in create' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:139:in
block in create_current'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:316:in block in each_current_configuration' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:313:in
each'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:313:in each_current_configuration' /usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/tasks/database_tasks.rb:138:in
create_current'
/usr/local/bundle/gems/activerecord-5.2.2.1/lib/active_record/railties/databases.rake:29:in block (2 levels) in <top (required)>' /usr/local/bundle/gems/rake-12.3.2/exe/rake:27:in
<top (required)>'
Tasks: TOP => db:create
(See full trace by running task with --trace)
cc @jpper