You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Eric Ihli 59c272ece9 Update image handler to serve files relatively 3 years ago
db Only expose DB locally 3 years ago
kv Add notes for KV store 4 years ago
load-balancer Gitignore unneeded files 3 years ago
util Update ssl readme 3 years ago
web Update image handler to serve files relatively 3 years ago
.dir-locals.el Add makefile for deploys 4 years ago
.gitattributes Add models to tracking 4 years ago
.gitignore Gitignore unneeded files 3 years ago
Makefile Add code related to rhyming and ssl 4 years ago
README.org Update image handler to serve files relatively 3 years ago

README.org

DarkLimericks

The world's largest metal limericks archive on the Web.

How To Initialize Development Environment

Steps

  1. Run ./db/run.sh && ./kv/run.sh to start the docker containers for the database and key-value store.

    1. The run.sh scripts only need to run once. They initialize development data containers. Subsequent development can continue with docker start db && docker start kv.
  2. Start a Clojure REPL in Emacs, evaluate the dev/user.clj namespace, and run (init)
  3. Visit http://localhost:8000

How To Run Software Locally

Requirements

Steps

  1. Run ./db/run.sh && ./kv/run.sh to start the docker containers for the database and key-value store.

    1. The run.sh scripts only need to run once. They initialize development data containers. Subsequent development can continue with docker start db && docker start kv.
  2. The application's jar builds with a make run from the root directory. (See Makefile).
  3. Navigate to the root directory of this git repo and run java -jar web/darklimericks.jar
  4. Visit http://localhost:8000

Development

Requires Tachyons CSS. There is a symlink in web/resources/public to the pre-built tachyons.css and tachyons.min.css found in the repo.

Build .jar with clojure -X:depstar uberjar :jar prhyme.jar.

Deployment

Since I'm developing this independently, it's not a very robust deployment system.

It's nice to have some parts of the repo available on the server; the db/kv scripts for example.

But obviously the album images and the data in the db/kv are going to be different between local and prod.

You can use rsync with --exclude to only sync over the code bits.

rsync --exclude '*/data/*' --exclude '*/images/*' -aLP ./ root@darklimericks.com:/root/darklimericks/

Note the -L to follow symlinks. Locally, I'm symlinking tachyons.css.

The other shortcut I'm taking is that images are stored and served relative to the path of the running application.

That means you need to launch the jar file from the web directory.