diff --git a/infra/deploy-playbook.yaml b/infra/deploy-playbook.yaml index 1a9fb97..8657e1f 100644 --- a/infra/deploy-playbook.yaml +++ b/infra/deploy-playbook.yaml @@ -125,8 +125,6 @@ DJANGO_SECRET_KEY: "{{ secret_key.content | b64decode }}" DJANGO_ALLOWED_HOST: "{{ django_allowed_host }}" DATABASE_URL: "postgresql://gamearray:{{ postgres_password }}@gamearray_postgres/gamearray" - EMAIL_HOST_USER: "{{ email_host_user }}" - EMAIL_HOST_PASSWORD: "{{ email_host_password }}" MAILGUN_API_KEY: "{{ mailgun_api_key }}" networks: - name: gamearray_net diff --git a/infra/gamearray.env.j2 b/infra/gamearray.env.j2 index d8257af..2b59194 100644 --- a/infra/gamearray.env.j2 +++ b/infra/gamearray.env.j2 @@ -2,6 +2,4 @@ DJANGO_DEBUG_FALSE=1 DJANGO_SECRET_KEY={{ secret_key.content | b64decode }} DJANGO_ALLOWED_HOST={{ django_allowed_host }} DATABASE_URL=postgresql://gamearray:{{ postgres_password }}@gamearray_postgres/gamearray -EMAIL_HOST_USER={{ email_host_user }} -EMAIL_HOST_PASSWORD={{ email_host_password }} MAILGUN_API_KEY={{ mailgun_api_key }} diff --git a/infra/group_vars/staging/vault.yaml b/infra/group_vars/staging/vault.yaml index b02574d..c7177aa 100644 --- a/infra/group_vars/staging/vault.yaml +++ b/infra/group_vars/staging/vault.yaml @@ -1,32 +1,23 @@ $ANSIBLE_VAULT;1.1;AES256 -30613631623932656263306132643162643365633835396562363635653233316634366639623664 -3431323239343430383264353064373437333538323461640a363263633563613633396661383034 -65383332386539666363343266336364323331323861363439373466653535626163356632356461 -3532386430316433610a366631373534303830656639323232376532666134623436366438333263 -35653130376232613731346565613462353433653932316232633936616361373061613339616437 -36356565333965353135613534343737626139643635333931383432653139313730376332333630 -37366334343065623136386462663830643233613638373361393637653931323865633232376332 -36316466646330303363333430626533396563623535373861353038623736326265643139333262 -64393935386565373531616431376435633663313165323132373935306636613331623931623566 -34646538346230663332633137643164626434383765613661323461643764663832333534303031 -30383365323561666538636266613435613236303033363064323466323037396364656534383032 -65633830323366346234666334363231393433306561346263356232366233333531323562383037 -63313931663339656533373533323566616361366332636364616335613336343165636433333137 -34343863653832653534366262343732653433653938333264376436616233626233383337383466 -31386633626133646538363063623062353361616564336261623364643736623136666634346466 -65666134316232316232373965386135623663396536633632373162343161636464613866306637 -38666339393564363862353135366639633530366461653664306162616261323834636131613131 -33633735386462336363646665656566616261663333326130383064303461356465396436656462 -64353835323232396365663130653834643337323036643333313563656630623662356537366235 -36646635646435333335343935646436623430353263393761613962353832326361373563346131 -34623537613861316562666634323438656663626238373230663565633138613539306537313866 -63613034666339393362663232353139313132623362306335373861623239353464306265326532 -62623334373263303135383537376562613933633661626233626433313433356365343735366539 -32333135646664363231333738366232646337316661623230323534366338656264376335353235 -34613533613631393064656239323530316438376232343933356464666637396666356464366139 -66316134633164653865326336623736383032666130653930306364313237663365323464383166 -35323634643032363265623338666165376365353135323732373932643564316261353662336166 -35333134373636313238333935626434663165636530306234396437336436323465386538336463 -66643036396161346330633436393532323962313762383134633164623139373362333138663236 -61353165663433383436666266366132633937316236306566346261633063393366343936323331 -643966366566643663373235386133326130 +33616230376431343735626631623932393166343538653732383533323436326335343463646664 +6565373531623465613661613533376231373837326438300a393665613839646231633737313938 +64633035336663313163333634623732323537326363646132313136376131636666636538323066 +3037373930303537320a313062646166353862633836373466316261363939633433663039323866 +62333739303662343836306538393734343830366336323265393138343438363533353166383031 +32313461313137643039376237346633316466646136353038633861333031663164656233366634 +38303363383130376264373861393863623330623733643135643461383132613339376633353031 +32313863323039646534633733383661333361313832333830383066633130396239626661643264 +65636335303339613432326533343337366261356632313639623634386633383836333733663536 +39383361353530646166643531333535356636326535383534326237666638326137616162646261 +65316466323335653932636338653565383038313531383638393839313736643739363037353230 +35653632353531656435396663316537333133653632366437613339303033333536643937353166 +64363037653733303332643931343362303261643432366531326262383465313965633064356338 +31336333373665373035656533633864316139303934623030383934393434356334643962666163 +33343739366336613263333764306365333566363536616662383733616237396563346132336633 +38663239613339376335386233386330396634323033343332366130616162666339393861306336 +35383566383831356530633130313732356331616164646132626665646235396635386237313538 +38656631336261646530303761643334303937613036363766303637376262373466316431323731 +38666462313639353131303134646434646135366136343361353932326165626666306361393431 +62646238323265346263386363373462313766616333326366366461346436383064336535376339 +31356566356336386262393831616631666233633930393263623563386265343237323133313832 +3430363635363332303963316530663765613666306233376463 diff --git a/infra/nginx.conf.j2 b/infra/nginx.conf.j2 index e0b6d0d..937380e 100644 --- a/infra/nginx.conf.j2 +++ b/infra/nginx.conf.j2 @@ -1,6 +1,6 @@ server { listen 80; - server_name {{ django_allowed_host }}; + server_name {{ django_allowed_host | replace(',', ' ')}}; location /static/ { alias /var/www/gamearray/static/; diff --git a/src/apps/lyric/tests/integrated/test_views.py b/src/apps/lyric/tests/integrated/test_views.py index 92219b2..43b00d9 100644 --- a/src/apps/lyric/tests/integrated/test_views.py +++ b/src/apps/lyric/tests/integrated/test_views.py @@ -22,7 +22,7 @@ class SendLoginEmailViewTest(TestCase): self.assertEqual(mock_post.called, True) data = mock_post.call_args.kwargs["data"] self.assertEqual(data["subject"], "A magic login link to your Dashboard") - self.assertEqual(data["from"], "adman@howdy.earthmanrpg.me") + self.assertEqual(data["from"], "adman@howdy.earthmanrpg.com") self.assertEqual(data["to"], "discoman@example.com") def test_adds_success_message(self): diff --git a/src/apps/lyric/views.py b/src/apps/lyric/views.py index 6d18ab1..5e2d612 100644 --- a/src/apps/lyric/views.py +++ b/src/apps/lyric/views.py @@ -18,7 +18,7 @@ def send_login_email(request): f"https://api.mailgun.net/v3/{settings.MAILGUN_DOMAIN}/messages", auth=("api", settings.MAILGUN_API_KEY), data={ - "from": "adman@howdy.earthmanrpg.me", + "from": "adman@howdy.earthmanrpg.com", "to": email, "subject": "A magic login link to your Dashboard", "text": message_body, diff --git a/src/core/settings.py b/src/core/settings.py index 04b6935..9a3ecd9 100644 --- a/src/core/settings.py +++ b/src/core/settings.py @@ -158,12 +158,6 @@ LOGGING = { }, } -# Email Settings -EMAIL_HOST = "smtp.mailgun.org" -EMAIL_HOST_USER = os.environ.get("EMAIL_HOST_USER") # switch back to .environ[] when collectstatic moved outside docker build process -EMAIL_HOST_PASSWORD = os.environ.get("EMAIL_HOST_PASSWORD") # switch back to .environ[] -EMAIL_PORT = 587 -EMAIL_USE_TLS = True # Mailgun API settings (for HTTP API instead of SMTP) MAILGUN_API_KEY = os.environ.get("MAILGUN_API_KEY") -MAILGUN_DOMAIN = "howdy.earthmanrpg.me" # Your Mailgun domain \ No newline at end of file +MAILGUN_DOMAIN = "howdy.earthmanrpg.com" # Your Mailgun domain \ No newline at end of file