Hey,
i am part of an NGO in germany and we are going to build a foodcoop. I am the guy who is administrating the NGOs servers, and i am quite new to ruby.
I was able to setup the software according to the, well lets say unfinished, documentation but i am unable to configure the mailing with an external postfix server.
I was able to find the env variables in the sourcecode and added them to the docker env but still i get a error when i request a token to set a new password. The token gets generated but when your software tries to generate an email it throws errors. here are the config and errors. Perhaps someone can help me to set this up. On the day i set this up the new docker image was released on docker hub, which is not working at all i am using version 4.6
THE DOCKER COMMAND:
docker run --name foodsoft_web5 -p 3001 -e SECRET_KEY_BASE=X*32 -e DATABASE_URL=“mysql2://foodcoop_debug:xxxxxxxxx@xxxxxxxxx:3306/footcoop_db02?encoding=utf8” -e REDIS_URL=“redis://xxxxxxxxxxxxxxx:6379” -e RAILS_FORCE_SSL=false -e SMTP_ADDRESS=“mail.xxxxxxxxxxx.de” -e SMTP_PORT=“587” -e SMTP_DOMAIN=“xxxxxxxx.de” -e SMTP_USER_NAME=“foodcoop” -e SMTP_PASSWORD=“xxxxxxxx” -e SMTP_AUTHENTICATION=“login” -e SMTP_ENABLE_STARTTLS_AUTO=“true” -e SMTP_OPENSSL_VERIFY_MODE=“peer” -e EMAIL_SENDER="foodcoop@xxxxx.de" -v “/etc/footsoft/config/app_config.yml:/usr/src/app/config/app_config.yml:ro” foodcoops/foodsoft:latest-release
stdout container:
Redirected to http://XXX.xxx.XXX.xxx:3001/XXXX/login
Filter chain halted as :authenticate rendered or redirected
Completed 302 Found in 4ms (ActiveRecord: 1.0ms)
Started GET “/XXXX/login” for 172.17.0.1 at 2020-03-26 15:08:04 +0000
Processing by SessionsController#new as HTML
Parameters: {“foodcoop”=>“XXXX”}
Set locale to de
Deface: [WARNING] No :original defined for ‘public_frontpage’, you should change its definition to include:
:original => ‘cf955bb7fa18a67d51becb035057c3d00650eff1’
Deface: [WARNING] No :original defined for ‘insert_link’, you should change its definition to include:
:original => ‘cf955bb7fa18a67d51becb035057c3d00650eff1’
Rendered sessions/new.html.haml within layouts/login (6.4ms)
Rendered layouts/_footer.html.haml (4.5ms)
Rendered layouts/_header.html.haml (9.8ms)
Completed 200 OK in 36ms (Views: 27.0ms | ActiveRecord: 6.1ms)
Started GET “/XXXX/login/forgot_password” for 172.17.0.1 at 2020-03-26 15:08:36 +0000
Processing by LoginController#forgot_password as HTML
Parameters: {“foodcoop”=>“XXXX”}
Set locale to de
Rendered login/forgot_password.html.haml within layouts/login (5.5ms)
Rendered layouts/_footer.html.haml (3.4ms)
Rendered layouts/_header.html.haml (6.1ms)
Completed 200 OK in 32ms (Views: 14.1ms | ActiveRecord: 6.3ms)
Started POST “/XXXX/login/reset_password” for 172.17.0.1 at 2020-03-26 15:08:39 +0000
Processing by LoginController#reset_password as HTML
Parameters: {“utf8”=>“✓”, “authenticity_token”=>“pCzWZGHJD4TTF2EC8fqRW+AetMREktmnB6YmLFujD84iJHudqDKFroT/YP4OXrEZD0vuDAFkyRtuTfrMUlJ6cg==”, “user”=>{“email”=>“nonextistendmember@email.tld”}, “commit”=>“Neues Passwort anfordern”, “foodcoop”=>“XXXX”} here email is not tied to user nor exists —> get redirected to login screen
Set locale to de
Redirected to http://XXX.xxx.XXX.xxx:3001/XXXX/login
Completed 302 Found in 6ms (ActiveRecord: 1.9ms)
Started GET “/XXXX/login” for 172.17.0.1 at 2020-03-26 15:08:39 +0000
Processing by SessionsController#new as HTML
Parameters: {“foodcoop”=>“XXXX”}
Set locale to de
Rendered sessions/new.html.haml within layouts/login (3.9ms)
Rendered layouts/_footer.html.haml (3.3ms)
Rendered layouts/_header.html.haml (5.7ms)
Completed 200 OK in 15ms (Views: 7.3ms | ActiveRecord: 4.7ms)
Started GET “/XXXX/login/forgot_password” for 172.17.0.1 at 2020-03-26 15:08:49 +0000
Processing by LoginController#forgot_password as HTML
Parameters: {“foodcoop”=>“XXXX”}
Set locale to de
Rendered login/forgot_password.html.haml within layouts/login (3.6ms)
Rendered layouts/_footer.html.haml (3.1ms)
Rendered layouts/_header.html.haml (5.4ms)
Completed 200 OK in 17ms (Views: 8.2ms | ActiveRecord: 4.6ms)
Started POST “/XXXX/login/reset_password” for 172.17.0.1 at 2020-03-26 15:08:53 +0000
Processing by LoginController#reset_password as HTML
Parameters: {“utf8”=>“✓”, “authenticity_token”=>“tlvnSTxEnE60qBMbvI5afv6VsU5NbZeTjlf0trgmsdQwU0qw9b8WZONAEudDKno8EcDrhgibhy/nvChWsdfEaA==”, “user”=>{“email”=>“xxxxx@xxxxxx.de”}, “commit”=>“Neues Passwort anfordern”, “foodcoop”=>“XXXX”} here user is admin with real email adress → it crashes
Set locale to de
Completed 500 Internal Server Error in 84ms (ActiveRecord: 65.2ms)
ActionController::UrlGenerationError (No route matches {:action=>“new_password”, :controller=>“login”, :id=>1, :token=>“lifreshychafibirdywibigaxedudicaphafra”} missing required keys: [:foodcoop]): → ruby error
app/mailers/mailer.rb:19:in reset_password' app/models/user.rb:135:in
request_password_reset!’
app/controllers/login_controller.rb:18:in reset_password' app/controllers/application_controller.rb:228:in
set_currency’
app/controllers/application_controller.rb:216:in `set_time_zone’
Processing by ErrorsController#show as HTML
Parameters: {“utf8”=>“✓”, “authenticity_token”=>“tlvnSTxEnE60qBMbvI5afv6VsU5NbZeTjlf0trgmsdQwU0qw9b8WZONAEudDKno8EcDrhgibhy/nvChWsdfEaA==”, “user”=>{“email”=>“elias@eliashaisch.de”}, “commit”=>“Neues Passwort anfordern”, “foodcoop”=>“XXXX”}
Set locale to de
Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.7ms)
Error during failsafe response: No config for this environment (XXXX) available!
/usr/src/app/lib/foodsoft_config.rb:212:in set_config' /usr/src/app/lib/foodsoft_config.rb:79:in
select_foodcoop’
/usr/src/app/app/controllers/errors_controller.rb:17:in select_foodcoop' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:432:in
block in make_lambda’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:164:in block in halting' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:504:in
block in call’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:504:in each' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:504:in
call’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:92:in __run_callbacks__' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:778:in
_run_process_action_callbacks’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:81:in run_callbacks' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/abstract_controller/callbacks.rb:19:in
process_action’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_controller/metal/rescue.rb:29:in process_action' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_controller/metal/instrumentation.rb:32:in
block in process_action’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in block in instrument' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications/instrumenter.rb:20:in
instrument’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/notifications.rb:164:in instrument' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_controller/metal/instrumentation.rb:30:in
process_action’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_controller/metal/params_wrapper.rb:250:in process_action' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.10/lib/active_record/railties/controller_runtime.rb:18:in
process_action’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/abstract_controller/base.rb:137:in process' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionview-4.2.10/lib/action_view/rendering.rb:30:in
process’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_controller/metal.rb:196:in dispatch' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_controller/metal/rack_delegation.rb:13:in
dispatch’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_controller/metal.rb:237:in block in action' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/gaffe-1.2.0/lib/gaffe.rb:22:in
block in enable!’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/show_exceptions.rb:47:in render_exception' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/show_exceptions.rb:35:in
rescue in call’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/show_exceptions.rb:29:in call' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/rack/logger.rb:38:in
call_app’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/rack/logger.rb:20:in block in call' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:68:in
block in tagged’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:26:in tagged' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:68:in
tagged’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/rack/logger.rb:20:in call' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/request_id.rb:21:in
call’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/methodoverride.rb:22:in call' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/runtime.rb:18:in
call’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.10/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in call' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.10/lib/action_dispatch/middleware/static.rb:120:in
call’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/sendfile.rb:113:in call' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/engine.rb:518:in
call’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/application.rb:165:in call' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/content_length.rb:15:in
call’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/thin-1.5.1/lib/thin/connection.rb:81:in block in pre_process' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/thin-1.5.1/lib/thin/connection.rb:79:in
catch’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/thin-1.5.1/lib/thin/connection.rb:79:in pre_process' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/thin-1.5.1/lib/thin/connection.rb:54:in
process’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/thin-1.5.1/lib/thin/connection.rb:39:in receive_data' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in
run_machine’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/eventmachine-1.0.9.1/lib/eventmachine.rb:193:in run' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/thin-1.5.1/lib/thin/backends/base.rb:63:in
start’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/thin-1.5.1/lib/thin/server.rb:159:in start' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/handler/thin.rb:19:in
run’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/server.rb:287:in start' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands/server.rb:80:in
start’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:80:in block in server' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in
tap’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:75:in server' /usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands/commands_tasks.rb:39:in
run_command!’
/usr/src/app/vendor/bundle/ruby/2.3.0/gems/railties-4.2.10/lib/rails/commands.rb:17:in <top (required)>' bin/rails:4:in
require’
bin/rails:4:in `’
Browser gives 500
Thanks in advance