Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nordigen api bank transactions #206

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@ services:
networks:
- lhs

mail:
build:
context: .
dockerfile: docker/Dockerfile-postfix
# ports:
# - 9025:25
volumes:
- .:/app
- ./etc/postfix/main.cf:/etc/postfix/main.cf
- ./etc/postfix/match_all_destination_pcre:/etc/postfix/match_all_destination_pcre
networks:
- lhs

volumes:
php-session:
pgdata:
Expand Down
15 changes: 15 additions & 0 deletions docker/Dockerfile-postfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM debian:10.8

RUN apt-get update && \
apt-get -y install postfix postfix-pcre mutt mailutils

# RUN cp /etc/services /var/spool/postfix/etc/services
# RUN cp /etc/resolv.conf /var/spool/postfix/etc/resolv.conf

# RUN mkdir /config && \
# mv /etc/postfix/main.cf /config/main.cf && \
# mv /etc/postfix/master.cf /config/master.cf && \
# ln -s /config/main.cf /etc/postfix/main.cf && \
# ln -s /config/master.cf /etc/postfix/master.cf

CMD ["postfix", "start-fg"]
54 changes: 54 additions & 0 deletions etc/postfix/main.cf
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2



# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = 7dedbd0b2e02
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
# mydestination = $myhostname, /etc/mailname, 7dedbd0b2e02, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 172.19.0.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

maillog_file = /dev/stdout
# virtual_alias_domains = example.com
# virtual_alias_maps = hash:/etc/postfix/virtual

local_recipient_maps=
luser_relay = root
mydestination = pcre:/etc/postfix/match_all_destination_pcre
1 change: 1 addition & 0 deletions etc/postfix/match_all_destination_pcre
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// this_can_be_anything
16 changes: 16 additions & 0 deletions lhs/docker_settings.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import datetime
import os

from .settings import *

# SECURITY WARNING: create your own key, and keep it secret!
Expand All @@ -14,6 +17,13 @@

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'


SMTP_SERVER = 'mail'
SMTP_TLS = False
SMTP_STARTTLS = False
SMTP_USER = None
SMTP_PASSWORD = None

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
Expand All @@ -40,3 +50,9 @@
'access_token': 'A0d7SbxK-Ylz',
'webhook_secret': 'YourSecretHere',
}

NORDIGEN_TOKEN = os.getenv('NORDIGEN_TOKEN', 'your-token')
NORDIGEN_ACCOUNT = os.getenv('NORDIGEN_ACCOUNT', 'your-account-id')

SUBS_MIN_PAYMENT = 5.00
SUBS_GRACE_PERIOD = datetime.timedelta(weeks=6)
232 changes: 232 additions & 0 deletions lhsauth/fixtures/User.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,232 @@
- model: lhsauth.user
pk: 1
fields:
email: [email protected]
password: flourish_sha1$YUszkBDZfc$f46578297e02944a362252925c68296d89ae4184
last_login: 2021-06-25 20:00:04+00:00
full_name: Testy McTestFace
subscribed: true
bankhash: null
creationdate: null
address: "99 somewhere road\r\nsomewhere ville\r\nEast Worsestshire"
hackney: true
subscription_period: 0
nickname: null
irc_nick: null
gladosfile: null
terminated: false
admin: true
has_profile: true
disabled_profile: false
doorbot_timestamp: null
emergency_name: Someone
emergency_phone: '123456789'
ldapuser: null
ldapnthash: null
ldapsshahash: null
ldapshell: null
ldapemail: null
gocardless_user: true
- model: lhsauth.user
pk: 2
fields:
email: [email protected]
password: flourish_sha1$YUszkBDZfc$f46578297e02944a362252925c68296d89ae4184
last_login: null
full_name: Test User 2
subscribed: false
bankhash: null
creationdate: null
address: "1 The street\r\nthe town\r\npostcode"
hackney: false
subscription_period: 0
nickname: null
irc_nick: null
gladosfile: null
terminated: false
admin: false
has_profile: false
disabled_profile: false
doorbot_timestamp: null
emergency_name: null
emergency_phone: null
ldapuser: null
ldapnthash: null
ldapsshahash: null
ldapshell: null
ldapemail: null
gocardless_user: false
- model: lhsauth.user
pk: 3
fields:
email: [email protected]
password: flourish_sha1$YUszkBDZfc$f46578297e02944a362252925c68296d89ae4184
last_login: null
full_name: Test User 2
subscribed: false
bankhash: null
creationdate: null
address: "1 The street\r\nthe town\r\npostcode"
hackney: false
subscription_period: 0
nickname: null
irc_nick: null
gladosfile: null
terminated: true
admin: false
has_profile: false
disabled_profile: false
doorbot_timestamp: null
emergency_name: null
emergency_phone: null
ldapuser: null
ldapnthash: null
ldapsshahash: null
ldapshell: null
ldapemail: null
gocardless_user: false
- model: lhsauth.user
pk: 4
fields:
email: [email protected]
password: flourish_sha1$YUszkBDZfc$f46578297e02944a362252925c68296d89ae4184
last_login: null
full_name: Test User 4
subscribed: false
bankhash: null
creationdate: null
address: "1 The street\r\nthe town\r\npostcode"
hackney: false
subscription_period: 0
nickname: null
irc_nick: null
gladosfile: null
terminated: false
admin: false
has_profile: false
disabled_profile: false
doorbot_timestamp: null
emergency_name: null
emergency_phone: null
ldapuser: null
ldapnthash: null
ldapsshahash: null
ldapshell: null
ldapemail: null
gocardless_user: false
- model: lhsauth.user
pk: 1000
fields:
email: [email protected]
password: flourish_sha1$YUszkBDZfc$f46578297e02944a362252925c68296d89ae4184
last_login: null
full_name: Tony the Tiger
subscribed: false
bankhash: null
creationdate: null
address: "somewhere sometime"
hackney: false
subscription_period: 0
nickname: null
irc_nick: null
gladosfile: null
terminated: false
admin: false
has_profile: false
disabled_profile: false
doorbot_timestamp: null
emergency_name: null
emergency_phone: null
ldapuser: null
ldapnthash: null
ldapsshahash: null
ldapshell: null
ldapemail: null
gocardless_user: false
- model: lhsauth.user
pk: 90001
fields:
email: [email protected]
password: flourish_sha1$YUszkBDZfc$f46578297e02944a362252925c68296d89ae4184
last_login: null
full_name: Tony the Tiger
subscribed: false
bankhash: null
creationdate: null
address: null
hackney: false
subscription_period: 0
nickname: null
irc_nick: null
gladosfile: null
terminated: false
admin: false
has_profile: false
disabled_profile: false
doorbot_timestamp: null
emergency_name: null
emergency_phone: null
ldapuser: null
ldapnthash: null
ldapsshahash: null
ldapshell: null
ldapemail: null
gocardless_user: false
- model: lhsauth.user
pk: 90002
fields:
email: [email protected]
password: flourish_sha1$YUszkBDZfc$f46578297e02944a362252925c68296d89ae4184
last_login: null
full_name: Mr Person
subscribed: false
bankhash: null
creationdate: null
address: null
hackney: false
subscription_period: 0
nickname: null
irc_nick: null
gladosfile: null
terminated: false
admin: false
has_profile: false
disabled_profile: false
doorbot_timestamp: null
emergency_name: null
emergency_phone: null
ldapuser: null
ldapnthash: null
ldapsshahash: null
ldapshell: null
ldapemail: null
gocardless_user: false
- model: lhsauth.user
pk: 999999
fields:
email: [email protected]
password: flourish_sha1$YUszkBDZfc$f46578297e02944a362252925c68296d89ae4184
last_login: null
full_name: Mr Person
subscribed: false
bankhash: null
creationdate: null
address: null
hackney: false
subscription_period: 0
nickname: null
irc_nick: null
gladosfile: null
terminated: false
admin: false
has_profile: false
disabled_profile: false
doorbot_timestamp: null
emergency_name: null
emergency_phone: null
ldapuser: null
ldapnthash: null
ldapsshahash: null
ldapshell: null
ldapemail: null
gocardless_user: false
Loading