summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2024-02-07 19:20:56 -0500
committerBenji Dial <benji@benjidial.net>2024-02-07 19:20:56 -0500
commit026d52a710e4c15e555e88c71d027a300d868a26 (patch)
tree90bbde8c484a84e3fddd2ae0592f000301b1d521
parent7b89b4cd703ee1123f01e3ddba0ae24911baf410 (diff)
downloadvoting-site-026d52a710e4c15e555e88c71d027a300d868a26.tar.gz
put email config in separate file so it can be .gitignored
-rw-r--r--.gitignore1
-rw-r--r--config.rkt9
-rw-r--r--email-template.rkt14
-rw-r--r--readme.txt12
4 files changed, 25 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index dbf4200..5ef8c70 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
database.db
+email.rkt
diff --git a/config.rkt b/config.rkt
index 28b43ee..343b401 100644
--- a/config.rkt
+++ b/config.rkt
@@ -12,12 +12,5 @@
(define signin-key-time 3600)
(define session-time 3600)
-
(define site-title "Benji's Voting Site")
-
-(error "please fill out the email entries in config.rkt and then comment out this line")
-(define email-server "smtp.example.org")
-(define email-port 587)
-(define email-user "noreply@example.org")
-(define email-password "my super secret password")
-(define email-from "noreply@example.org")
+(require "email.rkt")
diff --git a/email-template.rkt b/email-template.rkt
new file mode 100644
index 0000000..58461b7
--- /dev/null
+++ b/email-template.rkt
@@ -0,0 +1,14 @@
+#lang racket
+
+(provide
+ email-server
+ email-port
+ email-user
+ email-password
+ email-from)
+
+(define email-server "smtp.example.org")
+(define email-port 587)
+(define email-user "noreply@example.org")
+(define email-password "my super secret password")
+(define email-from "noreply@example.org")
diff --git a/readme.txt b/readme.txt
index 652a1ef..0296506 100644
--- a/readme.txt
+++ b/readme.txt
@@ -6,14 +6,20 @@ This is the source of the website at vote.benjidial.net.
This code is written in Racket and requires a few packages. On Debian, you can
get all of the dependencies by running the following commands:
+
sudo apt install racket
raco pkg install koyo scgi smtp
=== running ===
-The server can be run with `racket main.rkt`. This will start a scgi server
-on port 9000. You will need an SCGI-compatible web server. For example, with
-nginx, you can make a server entry with:
+Before the server can be run, it must be configured. Copy email-template.rkt to
+email.rkt and then fill out the values. You can optionally change the variables
+in config.rkt as well.
+
+The server can then be run with `racket main.rkt`. This will start a scgi
+server on port 9000. You will need an SCGI-compatible web server to reverse
+proxy this. For example, with nginx, you can make a server entry with:
+
server {
location / {
include scgi_params;