diff --git a/app/controllers/admin/ldap_users_controller.rb b/app/controllers/admin/ldap_users_controller.rb index 9d5be6e..def46f4 100644 --- a/app/controllers/admin/ldap_users_controller.rb +++ b/app/controllers/admin/ldap_users_controller.rb @@ -25,7 +25,7 @@ class Admin::LdapUsersController < Admin::BaseController private def ldap_client - ldap_client ||= Net::LDAP.new host: ENV['LDAP_HOST'], + ldap_client ||= Net::LDAP.new host: ldap_config['host'], port: ldap_config['port'], encryption: ldap_config['ssl'], auth: { diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index 6d3f4e0..1444b2d 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -2Xf7uhBU+61XZL2HMF8Xs9fhVkpOhNfV5PKkHPu4uASpP1zwEJZcRyTJrhBVvJ29Y3m+3hhNAI2OeiYFDPepMDWcocrVjS+am/Gt9DW2tbhYZo0nN9lMU6EymQ5tl9ROgnvcPukwf823/Mrb6zPBysHruOlhdRc7JmW6EXuxL6tUhGsSJmaRfGiMWwiioJsyHCB2VsesKZlSDxItnhuX5d8gBABJyNdzi+Pyepz7MWkWp6ux80jOANq5uljn8bP5CLgUZKoGgveKzZdIs2uNb0wSIohSn+Ckfm+QhMm6mlEocAkHPt+nToiNAmSnx7p/l1sqKNFXslXHJKdkFFr8tx/R45aGPA/nL6R16DOnjtsJ84JXeh13VwR/0ZkyzsM2dQIwCvwo3xjdgBi46HWMwXwm6Y3A+ni6sK5BEvmAT4qu--AoOw35tpM//TeoWI--Uz4fvyRgmc2ewK6d7OFo6A== \ No newline at end of file +LWyKwPZq9Kd97rn/7+q3MEkh7kITScDMHD3JvVuaV3A4YIHJHU+460k+PaEGlsH1xkbuClGiAb57rk1XLyDnmVGtbSueYOtinkw6kar8ZfKWZob061LwGjpMVRQkS49TjCUZlqCFrXeKxlH03mXWBnqAj9RUIPrm7eibb3c7qmJFglR1380RSVsfZnp8A3QwGm4Wh9OWtpUa6P2lne0jQsOuSe8ur3DUF0LplzS4CbkMxAUDOom+pXB13AlxOH9NQE7F4dsYHugHkh1tG3r3ER3xAUD/9Kn6UZZP7BnwUs3zqhoZdULRpRgA5dK7ueTIAnO/jtJDF4562VS8ECo7AnNoVxNe8/mBMFIOUfqg+db/72N2pIk3r4lK7Uzm/4jJ5/99ItnQjHQPcApiwZXIr3OyDLUvq5+d0UVmAMXdwcAjvctVQXFx5imG149Y0ISHKWVm1ca37aAspxWPU+CIj8/HW0yEpjp3vhwDUbjCaZeAPm8UQC14MxZwSK3N+EUSQXdltiweFynabDB7zGGQsjMM8LwMtyo9bTBzJA78Cl96MDyd20i1zSF9ntLuKulwGm3oZowpbNuvo2anY6r9yBlDJBOEISbtXv2tLX4SqcM=--bRcsE4K/29XzyZat--+G3iQCLBqgSwLaQ+7+4YvA== \ No newline at end of file diff --git a/config/database.yml b/config/database.yml index 4a8a1b2..175f795 100644 --- a/config/database.yml +++ b/config/database.yml @@ -22,4 +22,9 @@ test: production: <<: *default - database: db/production.sqlite3 + adapter: postgresql + database: akkounts + port: 5432 + host: <%= Rails.application.credentials.postgres[:host] %> + username: <%= Rails.application.credentials.postgres[:username] %> + password: <%= Rails.application.credentials.postgres[:password] %> diff --git a/config/environments/production.rb b/config/environments/production.rb index 168822d..e26e4f0 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -59,6 +59,17 @@ Rails.application.configure do config.action_mailer.perform_caching = false + config.action_mailer.delivery_method = :smtp + + config.action_mailer.smtp_settings = { + address: "mail.gandi.net", + port: "587", + user_name: Rails.application.credentials.smtp[:username], + password: Rails.application.credentials.smtp[:password] + } + + config.action_mailer.default_url_options = { host: "accounts.kosmos.org", protocol: "https" } + # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false diff --git a/config/ldap.yml b/config/ldap.yml index 18277aa..345f530 100644 --- a/config/ldap.yml +++ b/config/ldap.yml @@ -50,7 +50,7 @@ production: port: 636 attribute: cn base: ou=kosmos.org,cn=users,dc=kosmos,dc=org - admin_user: "cn=Directory Manager" - admin_password: writtenbychef + admin_user: <%= Rails.application.credentials.ldap[:username] %> + admin_password: <%= Rails.application.credentials.ldap[:password] %> ssl: simple_tls # <<: *AUTHORIZATIONS