From 62839183233e17e4e99f2de52a9e4dc7263732a9 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Sat, 29 Oct 2022 23:43:53 +0100 Subject: [PATCH] update makefile. --- makefile | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/makefile b/makefile index 91aa274..9bf5e47 100644 --- a/makefile +++ b/makefile @@ -17,15 +17,20 @@ help: # Commands for Server # ============================================================================== -setup: +install: apt update - apt -y install certbot sbcl rlwrap nginx + apt -y install certbot sbcl rlwrap nginx libev4 curl https://beta.quicklisp.org/quicklisp.lisp - sbcl --load "/usr/share/common-lisp/source/quicklisp/quicklisp.lisp" \ - --eval (quicklisp-quickstart:install) \ + sbcl --load "/usr/share/common-lisp/source/quicklisp/quicklisp.lisp" + sbcl --eval (quicklisp-quickstart:install) \ --eval (ql:add-to-init-file) \ --quit - @echo 'Setup complete.' + @echo 'Install complete.' + +quicklisp-add: + @echo 'Adding project to quicklisp...' + ln -s ~/ritherdon-archive ~/quicklisp/local-projects/ + @echo 'Added to quicklisp.' service: @echo 'Setting up systemd service... NOT IMPLEMENTED' @@ -39,7 +44,12 @@ http: systemctl restart nginx @echo 'ritherdon-archive added to nginx (HTTP only).' -run: +run-prod: rlwrap $(LISP) --eval '(ql:quickload :ritherdon-archive)' \ --eval '(setf (osicat:environment-variable "APP_ENV") "production")' \ --eval '(ritherdon-archive:main :port 5000)' + +run-dev: + rlwrap $(LISP) --eval '(ql:quickload :ritherdon-archive)' \ + --eval '(setf (osicat:environment-variable "APP_ENV") "developement")' \ + --eval '(ritherdon-archive:main :port 5000)'