Error Create Discourse app Docker image

unsupported-install

(Atul Nirmalkar) #1

I am following https://medium.freecodecamp.org/how-to-set-up-an-internal-team-forum-in-half-a-day-using-discourse-b13588d907fe
to deploy and maintain Discourse using kubernetes .

I am getting error while creating docker image

I, [2018-10-08T10:49:57.759253 #16]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
Failed to report error: Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED) 2 Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED) subscribe failed, reconnecting in 1 second. Call stack ["/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/redis-4.0.1/lib/redis/client.rb:344:in `rescue in establish_connection'", "/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/redis-4.0.1/lib/redis/client.rb:328:in `establish_connection'", "/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/redis-4.0.1/lib/redis


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 10532 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development --retry 3 --jobs 4'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}

I am able to login to redis using redis-cli .

This is my web_only.yml

templates:
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
env:
  LANG: en_US.UTF-8
  UNICORN_WORKERS: 2
  DISCOURSE_DB_USERNAME: 'dev'
  DISCOURSE_DB_PASSWORD: ''
  DISCOURSE_DB_HOST: 'localhost'
  DISCOURSE_DB_NAME: 'discourse'
  DISCOURSE_DEVELOPER_EMAILS: 'anirmalkar@gmail.com'
  DISCOURSE_HOSTNAME: 'localhost'
  DISCOURSE_REDIS_HOST: 'localhost'
hooks:......

(Régis Hanol) #2

You should ask the author of this post if you’re having issues with his tutorial :wink:

Also, why spend half a day when you can only spend half an hour?


(Jeff Atwood) #3

Yes, why do you need to do this, follow the official install guide.