starlightcrafted / docker-postal

Docker container for Postal (atech/postal)
134 stars 58 forks source link

unable to run: rake aborted #23

Open savy-91 opened 4 years ago

savy-91 commented 4 years ago

Hi! I tried to clone this repository and start the docker-compose file (tried both with ubuntu and alpine) after following the instructions, however I cannot manage to make it run. Here is the log of the postal service:


== Waiting for MySQL and RabbitMQ to start up ==
2020/05/12 12:08:51 Waiting for: tcp://mysql:3306
2020/05/12 12:08:51 Waiting for: http://rabbitmq:5672/api/aliveness-test
2020/05/12 12:08:51 Connected to tcp://mysql:3306
2020/05/12 12:08:51 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:52 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:53 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:54 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:55 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:56 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:57 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:58 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:08:59 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:09:00 Problem with request: Get http://rabbitmq:5672/api/aliveness-test: net/http: HTTP/1.x transport connection broken: malformed HTTP response "AMQP\x00\x00\t\x01". Sleeping 1s
2020/05/12 12:09:01 Timeout after 10s waiting on dependencies to become available: [tcp://mysql:3306 http://rabbitmq:5672/api/aliveness-test]
Initializing database
rake aborted!
Errno::EISDIR: Is a directory @ io_fillbuf - fd:5 /opt/postal/config/postal.yml
/opt/postal/lib/postal/config.rb:64:in `yaml_config'
/opt/postal/lib/postal/config.rb:31:in `config'
/opt/postal/lib/postal/config.rb:76:in `database_url'
/opt/postal/config/boot.rb:11:in `<top (required)>'
/opt/postal/config/application.rb:1:in `require_relative'
/opt/postal/config/application.rb:1:in `<top (required)>'
/opt/postal/Rakefile:4:in `require_relative'
/opt/postal/Rakefile:4:in `<top (required)>'
/opt/postal/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/bundle:23:in `load'
/usr/local/bundle/bin/bundle:23:in `<main>'
(See full trace by running task with --trace)
/usr/local/lib/ruby/2.6.0/psych.rb:577:in `initialize': Is a directory @ io_fillbuf - fd:5 /opt/postal/config/postal.yml (Errno::EISDIR)
        from /usr/local/lib/ruby/2.6.0/psych.rb:577:in `open'
        from /usr/local/lib/ruby/2.6.0/psych.rb:577:in `load_file'
        from /opt/postal/lib/postal/config.rb:64:in `yaml_config'
        from /opt/postal/lib/postal/config.rb:31:in `config'
        from /opt/postal/lib/postal/config.rb:76:in `database_url'
        from /opt/postal/config/boot.rb:11:in `<top (required)>'
        from /opt/postal/config/application.rb:1:in `require_relative'
        from /opt/postal/config/application.rb:1:in `<top (required)>'
        from /opt/postal/config/environment.rb:2:in `require_relative'
        from /opt/postal/config/environment.rb:2:in `<top (required)>'
        from script/make_user.rb:4:in `require_relative'
        from script/make_user.rb:4:in `<main>'
/usr/local/lib/ruby/2.6.0/psych.rb:577:in `initialize': Is a directory @ io_fillbuf - fd:5 /opt/postal/config/postal.yml (Errno::EISDIR)
        from /usr/local/lib/ruby/2.6.0/psych.rb:577:in `open'
        from /usr/local/lib/ruby/2.6.0/psych.rb:577:in `load_file'
        from /opt/postal/lib/postal/config.rb:64:in `yaml_config'
        from /opt/postal/lib/postal/config.rb:31:in `config'
        from script/update_process_concurrency.rb:4:in `<main>'
Igcorreia commented 4 years ago

I have the exact same issue. Changed the password as instructed but the build just does not happen. I tried on both folder Ubunto and Alpine with no luck.

Igcorreia commented 4 years ago

I notice that when the tutorial says to run: docker-compose run postal initialize

A folder called postal.yml is created but it is empty and I also noticed 2 files in the templates folder.

Are we supposed to create a postal.yml file? Maybe I am doing the steps incorrectly.

starlightcrafted commented 4 years ago

Latest update should fix the issue.

Please let me know if this is not the case

Igcorreia commented 4 years ago

I think I know the problem: --: /docker-entrypoint.sh: /usr/bin/bash^M: bad interpreter: No such file or directory

We are running it in Windows. That is why.