From 77827621b174649c74e0c4e6c079a496f0525bb9 Mon Sep 17 00:00:00 2001 From: Patrick Easters Date: Sun, 28 Apr 2024 08:18:13 -0400 Subject: [PATCH 01/12] Log to stdout for jouurnald --- production.conf | 3 --- 1 file changed, 3 deletions(-) diff --git a/production.conf b/production.conf index 4fa4de7..e1f85fd 100644 --- a/production.conf +++ b/production.conf @@ -1,7 +1,4 @@ [global] -log.error_file : os.path.join(os.getcwd(), 'checkMeIn.log') -log.access_file : '' -log.screen : False server.socket_host : '127.0.0.1' server.socket_port : 8447 database.path : 'data/' From 10072418f1a8997176fef559f9da7285be53af57 Mon Sep 17 00:00:00 2001 From: Patrick Easters Date: Sun, 28 Apr 2024 08:18:28 -0400 Subject: [PATCH 02/12] Add systemd units --- etc/Caddyfile | 4 ++++ etc/caddy.service | 20 ++++++++++++++++++++ etc/checkmein.service | 15 +++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 etc/Caddyfile create mode 100644 etc/caddy.service create mode 100644 etc/checkmein.service diff --git a/etc/Caddyfile b/etc/Caddyfile new file mode 100644 index 0000000..92658be --- /dev/null +++ b/etc/Caddyfile @@ -0,0 +1,4 @@ +checkmein.stage.theforgeinitiative.org { + tls + reverse_proxy localhost:8447 +} \ No newline at end of file diff --git a/etc/caddy.service b/etc/caddy.service new file mode 100644 index 0000000..966c85d --- /dev/null +++ b/etc/caddy.service @@ -0,0 +1,20 @@ +[Unit] +Description=Caddy +Documentation=https://caddyserver.com/docs/ +After=network.target network-online.target +Requires=network-online.target + +[Service] +Type=notify +User=caddy +Group=caddy +ExecStart=/usr/local/bin/caddy run --environ --config /opt/caddy/Caddyfile +ExecReload=/usr/local/bin/caddy reload --config /opt/caddy/Caddyfile --force +TimeoutStopSec=5s +LimitNOFILE=1048576 +PrivateTmp=true +ProtectSystem=full +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE + +[Install] +WantedBy=multi-user.target diff --git a/etc/checkmein.service b/etc/checkmein.service new file mode 100644 index 0000000..9369d98 --- /dev/null +++ b/etc/checkmein.service @@ -0,0 +1,15 @@ +[Unit] +Description=CheckMeIn +After=network-online.target +Requires=network-online.target + +[Service] +User=checkmein +Restart=on-failure +RestartSec=30 +AmbientCapabilities=CAP_NET_BIND_SERVICE +WorkingDirectory=/opt/checkmein/src +ExecStart=/opt/checkmein/venv/bin/python3 checkMeIn.py production.conf + +[Install] +WantedBy=multi-user.target From adc27aa238e5e17caf9c3841fe567273d60bacbd Mon Sep 17 00:00:00 2001 From: Patrick Easters Date: Tue, 30 Apr 2024 21:17:45 -0400 Subject: [PATCH 03/12] Update sender --- utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.py b/utils.py index ece8ff6..de6b7e9 100644 --- a/utils.py +++ b/utils.py @@ -2,7 +2,7 @@ import email.utils import smtplib -FROM_EMAIL = "tfi@checkmein.site" +FROM_EMAIL = "noreply@theforgeinitiative.org" FROM_NAME = "TFI CheckMeIn" From bf067c7ad51389dc8f8d9a6511ef437820a670bf Mon Sep 17 00:00:00 2001 From: Patrick Easters Date: Tue, 31 Dec 2024 22:39:09 -0500 Subject: [PATCH 04/12] New location, who dis? --- HTMLTemplates/links.mako | 12 ++++++------ docs.py | 2 +- tests/misc_tests.py | 2 +- tests/sampleData.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/HTMLTemplates/links.mako b/HTMLTemplates/links.mako index 6494fbc..b0b2045 100644 --- a/HTMLTemplates/links.mako +++ b/HTMLTemplates/links.mako @@ -23,9 +23,9 @@ ${self.logo()}
Personal

General @@ -47,8 +47,8 @@ ${self.logo()}
Keyholder

% endif % endif -
BFF Stations +
LOFT Stations