Public archive for the Return to Ritherdon project. https://www.nicolaellisandritherdon.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

71 lines
2.3 KiB

LISP ?= sbcl
help:
@echo 'Usage: make [command]'
@echo
@echo 'Commands to run on server:'
@echo ' install Install Debian packages and Quicklisp for website.'
@echo
@echo ' quicklisp-add Add repo. to Quicklisp local-projects directory.'
@echo
@echo ' service Set-up and start systemd service.'
@echo
@echo ' add-search Install Meilisearch instance.'
@echo
@echo ' http Add ritherdon-archive to nginx (http only).'
@echo
@echo ' run-prod Run ritherdon-archive (port 5000) in prod. environment.'
@echo
@echo ' run-dev Run ritherdon-archive (port 5000) in dev. environment.'
@echo
@echo 'Default target:'
@echo ' help Show this help message.'
# Commands for Server
# ==============================================================================
install:
apt update
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"
sbcl --eval (quicklisp-quickstart:install) \
--eval (ql:add-to-init-file) \
--quit
@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'
sytemctl enable "conf/ritherdon-archive.service"
systemctl daemon-reload
systemctl start ritherdon-archive
@echo 'systemd set-up and running.'
add-search:
@echo 'Installing and setting up Meilisearch instance... NOT IMPLEMENTED'
# Download meilisearch
# Setup filters and sorting order
# Add nginx conf file
sytemctl enable "conf/meilisearch.service"
systemctl daemon-reload
systemctl start meilisearch
@echo 'Meilisearch set-up and running.'
http:
@echo 'Adding ritherdon-archive to nginx... NOT IMPLEMENTED'
systemctl restart nginx
@echo 'ritherdon-archive added to nginx (HTTP only).'
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)'