From 6d45ff9c630b279d5107e0c08d08b3020b28b42a Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Sun, 14 Aug 2022 17:50:53 +0100 Subject: [PATCH] 2022.14.08.2 snapshot. --- app.lisp | 4 +++- conf/hot-line-prod.conf | 4 ++-- src/config.lisp | 11 ++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/app.lisp b/app.lisp index 9886106..6c785d5 100644 --- a/app.lisp +++ b/app.lisp @@ -38,4 +38,6 @@ (let ((datafly:*trace-sql* t)) (funcall app env))))) *web*) - :debug t) + :debug (if (hot-line.config:productionp) + nil + t)) ; Added as part of clack-error-middleware. diff --git a/conf/hot-line-prod.conf b/conf/hot-line-prod.conf index 55cecec..46d791c 100644 --- a/conf/hot-line-prod.conf +++ b/conf/hot-line-prod.conf @@ -1,4 +1,4 @@ -upstream hot-line { +upstream hunchentoot { server 127.0.0.1:3002; } @@ -24,7 +24,7 @@ server { # if the requested file does not exist then # proxy to the hunchentoot server cluster if (!-f $request_filename) { - proxy_pass http://hot-line; + proxy_pass http://hunchentoot; } } } \ No newline at end of file diff --git a/src/config.lisp b/src/config.lisp index 8ed7377..c993173 100644 --- a/src/config.lisp +++ b/src/config.lisp @@ -27,7 +27,11 @@ '()) (defconfig |production| - '()) + `(:debug nil + :databases + ((:maindb :sqlite3 :database-name ,(merge-pathnames #P"db/hot-line.db" + *application-root*))))) + (defconfig |test| '()) @@ -43,3 +47,8 @@ (defun productionp () (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")