Browse Source

create nginx .conf and systemd .service files.

These will need tweaking. The most notable one being the nginx .conf file. The
website's URL hasn't been decided yet.
stable
Craig Oates 1 year ago
parent
commit
4914f3a9bc
  1. 30
      conf/ritherdon-archive.conf
  2. 13
      conf/ritherdon-archive.service

30
conf/ritherdon-archive.conf

@ -0,0 +1,30 @@
upstream woo {
server 127.0.0.1:3001;
}
server {
listen 80;
server_name www.nicolaellisandritherdonarchive.com nicolaellisandritherdonarchive.com;
root ~/quicklisp/local-projects/ritherdon-archive/templates/;
# General request handling this will match all locations
location / {
# check if with it's a directory and there'a an index.html
# if so, rewrite the url to include it and stop processing rules.
if (-f $request_filename/index.html) {
rewrite ^(.*) $1/index.html break;
}
# Define custom HTTP Headers to be used when proxying
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
# if the requested file does not exist then
# proxy to the woo server cluster
if (!-f $request_filename) {
proxy_pass http://woo;
}
}
}

13
conf/ritherdon-archive.service

@ -0,0 +1,13 @@
[Unit]
Description=Nicola Ellis and Ritherdon Archive website.
After = syslog.target network.target
[Service]
ExecStart=/usr/bin/sbcl --eval '(ql:quickload :co-web)' --eval '(setf (osicat:environment-variable "APP_ENV") "production")' --eval '(ritherdon-archive:main)'
Restart=always
RestartSec=10
KillSignal=SIGINT
User=nic
[Install]
WantedBy=multi-user.target
Loading…
Cancel
Save