Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Development

Javran Cheng edited this page Apr 19, 2016 · 3 revisions

Clone the project and build with stack

$ git clone https://github.com/CNMDR3G/hathverse.git
$ cd hathverse && stack init && stack build

Initilize the database and run

$ initdb --locale en_US.UTF-8 -E UTF8 -D '/usr/local/var/postgres'  # can be other directory
$ createuser -s -e -d hathverse
$ createdb hathverse -U hathverse
$ postgres -D /usr/local/var/postgres &  # or systemd
# add some data:
# (probably this should be done after hathverse has been started
# otherwise you'll find some error messages about missing table.)
$ cat init.sql | psql hathverse -U hathverse
# in hathverse's directory:
$ stack exec hathverse

Setup docker image

# on mac:
$ docker-machine start
# or on linux with systemd:
$ sudo systemctl start docker
# build the docker image (need to download ~300MB and take a while):
$ docker build -t scturtle/hathverse:alpine .
# test with cmd:
$ docker run -it --rm scturtle/hathverse:alpine