further cleanup and securing

This commit is contained in:
Matthew Tran
2025-02-19 00:30:35 -08:00
parent be0530cafe
commit dd072e76d8
6 changed files with 112 additions and 43 deletions
+1
View File
@@ -11,6 +11,7 @@ RUN pip3 install sendgrid --break-system-packages
RUN rm /etc/nginx/sites-enabled/default
# enable site
# TODO make the website code not terrible ;-;
COPY matthewtran.com /etc/nginx/sites-available
RUN ln -s /etc/nginx/sites-available/matthewtran.com /etc/nginx/sites-enabled/matthewtran.com
COPY html /var/www/matthewtran.com/html
+6 -5
View File
@@ -26,11 +26,12 @@ if __name__ == "__main__":
from_email="mtran319@gmail.com",
to_emails="mtran319@gmail.com",
subject="pls update ip",
html_content=f"<p>old ipv4: {old_ipv4}</p>"
f"<p>old ipv6: {old_ipv6}</p>"
f"<p>new ipv4: {ipv4}</p>"
f"<p>new ipv6: {ipv6}</p>"
)
html_content=(
f"<p>old ipv4: {old_ipv4}</p>"
f"<p>old ipv6: {old_ipv6}</p>"
f"<p>new ipv4: {ipv4}</p>"
f"<p>new ipv6: {ipv6}</p>"
))
try:
print(f"IP changed to {ipv4} and {ipv6}")
resp = sg.send(msg)