Browse Source
commit 17d536ac7e
Author: Craig Oates <craig@craigoates.net>
Date: Sun Aug 14 16:06:31 2022 +0100
create systemd and nginx config. files.
These files are reference files to get hot-line set-up on the server.
master
Craig Oates
2 years ago
2 changed files with 43 additions and 0 deletions
@ -0,0 +1,30 @@
|
||||
upstream hunchentoot { |
||||
server 127.0.0.1:3002; |
||||
} |
||||
|
||||
server { |
||||
listen 80; |
||||
server_name charts.craigoates.net; |
||||
|
||||
root ~/quicklisp/local-projects/hot-line/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 hunchentoot server cluster |
||||
if (!-f $request_filename) { |
||||
proxy_pass http://hunchentoot; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,13 @@
|
||||
[Unit] |
||||
Description=Production version of charts.craigoates.net. |
||||
After = syslog.target network.target |
||||
|
||||
[Service] |
||||
ExecStart=/usr/bin/sbcl --eval '(ql:quickload :hot-line)' --eval '(setf (osicat:environment-variable "APP_ENV") "production")' --eval '(hot-line:main)' |
||||
Restart=always |
||||
RestartSec=10 |
||||
KillSignal=SIGINT |
||||
User=craig |
||||
|
||||
[Install] |
||||
WantedBy=multi-user.target |
Loading…
Reference in new issue