Fixing Password Rest

* Reverting 'forgot' view back to a form
* Adding smtp configuration for production
* Adding postfix image to docker-compose
This commit is contained in:
Absurdon 2019-10-14 22:26:43 +02:00
parent d27e72b6e4
commit 7ec019fda6
No known key found for this signature in database
GPG key ID: E383BEAE6F394B2F
5 changed files with 40 additions and 4 deletions

View file

@ -1,2 +1,5 @@
Dockerfile
db_data
dkim
log/*
public/*

3
.gitignore vendored
View file

@ -18,6 +18,9 @@
db_data/*
!db_data/.placeholder
# ignore dkim keys
dkim
# OS X
.DS_Store

View file

@ -1,7 +1,22 @@
<h1>Password Recovery</h1>
<p><strong>We are currently unable to send automated emails!</strong></p>
<p>Please see the guide <a href="https://www.ensl.org/articles/1042">here</a> on instructions on requesting a password reset.</p>
<p>If you do not receive your new password by email, please see the guide <a href="https://www.ensl.org/articles/1042">here</a>.</p>
<%= form_tag({ controller: 'users', action: 'forgot' }, { class: 'square' }) do %>
<div class="fields horizontal">
<%= label_tag :username %>
<%= text_field_tag :username %>
</div>
<div class="fields horizontal">
<%= label_tag :email %>
<%= text_field_tag :email %>
</div>
<div class="controls">
<%= submit_tag "Recover password" %>
</div>
<% end %>
<p>
Special characters have been removed from nicks. <br> You may need to

View file

@ -48,8 +48,13 @@ Ensl::Application.configure do
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
# Use sendmail
config.action_mailer.delivery_method = :sendmail
# Use smtp-Server
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp',
domain: 'ensl.org'
}
config.action_mailer.raise_delivery_errors = true
# Enable threaded mode

View file

@ -5,11 +5,13 @@ services:
image: ensl/ensl.org:latest
volumes:
- "../public:/var/www/public"
- "../logs:/var/www/log"
ports:
- "4000:4000"
depends_on:
- db
- memcached
- smtp
# - redis
db:
image: mariadb:latest
@ -26,5 +28,13 @@ services:
# - MYSQL_ROOT_HOST
memcached:
image: memcached:latest
smtp:
image: mwader/postfix-relay:latest
restart: always
volumes:
- "../dkim:/etc/opendkim/keys"
environment:
- POSTFIX_myhostname=ensl.org
- OPENDKIM_DOMAINS=ensl.org
#redis:
# image: redis