Compare commits

...

4 Commits

Author SHA1 Message Date
Craig Oates 7d45f5e1ab update umami script. 12 months ago
Craig Oates 83294f1d96 add config. code for DB in prod. and clack middleware debug. 2 years ago
Craig Oates 7a5d03a55e Merge branch 'master' into stable (hot-line-prod.conf change). 2 years ago
Craig Oates 17d536ac7e create systemd and nginx config. files. 2 years ago
  1. 4
      app.lisp
  2. 4
      conf/hot-line-prod.conf
  3. 11
      src/config.lisp
  4. 2
      src/view.lisp

4
app.lisp

@ -38,4 +38,6 @@
(let ((datafly:*trace-sql* t)) (let ((datafly:*trace-sql* t))
(funcall app env))))) (funcall app env)))))
*web*) *web*)
:debug t) :debug (if (hot-line.config:productionp)
nil
t)) ; Added as part of clack-error-middleware.

4
conf/hot-line-prod.conf

@ -1,4 +1,4 @@
upstream hot-line { upstream hunchentoot {
server 127.0.0.1:3002; server 127.0.0.1:3002;
} }
@ -24,7 +24,7 @@ server {
# if the requested file does not exist then # if the requested file does not exist then
# proxy to the hunchentoot server cluster # proxy to the hunchentoot server cluster
if (!-f $request_filename) { if (!-f $request_filename) {
proxy_pass http://hot-line; proxy_pass http://hunchentoot;
} }
} }
} }

11
src/config.lisp

@ -27,7 +27,11 @@
'()) '())
(defconfig |production| (defconfig |production|
'()) `(:debug nil
:databases
((:maindb :sqlite3 :database-name ,(merge-pathnames #P"db/hot-line.db"
*application-root*)))))
(defconfig |test| (defconfig |test|
'()) '())
@ -43,3 +47,8 @@
(defun productionp () (defun productionp ()
(string= (appenv) "production")) (string= (appenv) "production"))
;;; Use this to change the environment between "development" and
;;; "production". This change is mostly to specifiy which database the
;;; system will use.
(setf (osicat:environment-variable "APP_ENV") "development")

2
src/view.lisp

@ -62,7 +62,7 @@ environment this website is running in."
(cond ((equal t (hot-line.config:productionp)) (cond ((equal t (hot-line.config:productionp))
(format (format
nil nil
"<script async defer data-website-id=\"ea4c9748-aa78-445e-a0af-f4943f3c16cb\" src=\"https://stats.abbether.net/umami.js\"></script>")) "<script async src=\"https://stats.abbether.net/script.js\" data-website-id=\"ea4c9748-aa78-445e-a0af-f4943f3c16cb\"></script>"))
(t (format nil "<!-- Umami has not been set-up -->")))) (t (format nil "<!-- Umami has not been set-up -->"))))
(djula::def-filter :chart-icon (filename) (djula::def-filter :chart-icon (filename)

Loading…
Cancel
Save