2016-03-06 12:58:48 +01:00
|
|
|
Vervis is still in early development. These instructions may be incomplete
|
|
|
|
and/or slightly outdated. At the time of writing, you can get a running Vervis
|
|
|
|
instance if you follow the steps below.
|
2016-03-05 04:55:06 +01:00
|
|
|
|
2018-03-24 16:09:22 +01:00
|
|
|
Check the version of OpenSSL installed on your system. For example:
|
2016-01-28 15:15:54 +01:00
|
|
|
|
2018-03-24 16:09:22 +01:00
|
|
|
$ apt show openssl
|
2016-01-28 15:15:54 +01:00
|
|
|
|
2018-03-24 16:09:22 +01:00
|
|
|
Currently Vervis is using a slightly old software configuration, and until I
|
|
|
|
fix that, it doesn't build with OpenSSL 1.1 and needs the older 1.0 or 1.0.1
|
|
|
|
version. If your distro has 1.1, see if you can grab 1.0 or 1.0.1 in some way,
|
|
|
|
either through the distro package or by downloading OpenSSL manually from its
|
|
|
|
website, or some alternative package manager such as GNU Guix.
|
|
|
|
|
|
|
|
Install stack. To install stack, go to its website and follow the instructions.
|
|
|
|
If you have some old version, such as one installed from FPComplete's old
|
|
|
|
debian repo, you may need to upgrade it.
|
|
|
|
|
|
|
|
Install Darcs. You can grab it from your distro, e.g.:
|
|
|
|
|
|
|
|
$ sudo apt install darcs
|
|
|
|
|
|
|
|
If you're going to create a Git repository on Vervis, you'll need Git too, you
|
|
|
|
can install it from a distro package too, e.g.:
|
|
|
|
|
|
|
|
$ sudo apt install git
|
|
|
|
|
|
|
|
Clone the Vervis repo:
|
|
|
|
|
|
|
|
$ darcs clone https://dev.seek-together.space/s/fr33domlover/r/vervis
|
2016-01-28 15:15:54 +01:00
|
|
|
$ cd vervis
|
|
|
|
|
2018-03-24 16:09:22 +01:00
|
|
|
Install GHC. Unless you prefer to use a distro package or PPA or some other
|
|
|
|
source, the easiest way is to install via stack:
|
|
|
|
|
|
|
|
$ stack setup
|
|
|
|
|
2016-05-21 23:32:18 +02:00
|
|
|
Check in `stack.yaml` near the top which extra repos are required. At the time
|
|
|
|
of writing, there are 4 of them (`hit-harder`, `hit-graph`, `hit-network` and
|
|
|
|
`ssh`). Then clone them. For example:
|
2016-03-06 12:58:48 +01:00
|
|
|
|
2018-04-01 00:29:00 +02:00
|
|
|
$ darcs clone https://dev.seek-together.space/s/fr33domlover/r/ssh
|
2016-03-06 12:58:48 +01:00
|
|
|
|
2018-03-24 16:09:22 +01:00
|
|
|
Some of those extra repos are at `hub.darcs.net` and some at
|
|
|
|
`dev.seek-together.space/s/fr33domlover/r`, I'm sorry I'm not just listing the
|
|
|
|
URLs here. These things have been changing often, but once they stabilize I
|
|
|
|
will update the docs, and also make releases of all these extra libraries.
|
|
|
|
|
|
|
|
Update `stack.yaml` to specify that path in the `packages` section if needed:
|
2016-03-06 12:58:48 +01:00
|
|
|
|
|
|
|
$ vim stack.yml
|
|
|
|
|
2016-03-07 01:33:59 +01:00
|
|
|
Generate a new SSH key with a blank password:
|
|
|
|
|
2016-03-07 01:37:07 +01:00
|
|
|
$ ssh-keygen -t rsa -f config/ssh-host-key
|
2016-03-07 01:33:59 +01:00
|
|
|
|
2016-03-06 12:58:48 +01:00
|
|
|
Install PostgreSQL. You'll need the server and the client library development
|
|
|
|
files.
|
|
|
|
|
2018-04-01 00:29:00 +02:00
|
|
|
$ sudo apt-get install postgresql libpq-dev
|
2016-03-06 12:58:48 +01:00
|
|
|
|
2018-04-01 00:29:00 +02:00
|
|
|
Switch to `postgres` system user:
|
2016-03-06 12:58:48 +01:00
|
|
|
|
2018-04-01 00:29:00 +02:00
|
|
|
$ sudo su - postgres
|
|
|
|
|
|
|
|
Create a PostgreSQL user.
|
|
|
|
|
|
|
|
With password:
|
|
|
|
|
|
|
|
$ createuser --no-createdb --no-createrole --no-superuser --encrypted --pwprompt vervis
|
|
|
|
|
|
|
|
No password (if you run Vervis as a user by the same name as the DB user):
|
|
|
|
|
|
|
|
$ createuser --no-createdb --no-createrole --no-superuser vervis
|
|
|
|
|
|
|
|
Create a PostgreSQL database:
|
|
|
|
|
|
|
|
$ createdb --encoding=UTF8 --owner=vervis vervis
|
2016-03-06 12:58:48 +01:00
|
|
|
|
2018-04-01 00:40:32 +02:00
|
|
|
Update the settings to specify correct database connection details and other
|
|
|
|
settings.
|
2016-03-06 12:58:48 +01:00
|
|
|
|
2018-04-01 00:40:32 +02:00
|
|
|
$ cp config/settings-default.yaml config/settings.yml
|
2018-03-24 16:09:22 +01:00
|
|
|
$ vim config/settings.yml
|
2016-03-06 12:58:48 +01:00
|
|
|
|
|
|
|
Build.
|
|
|
|
|
2018-03-24 16:09:22 +01:00
|
|
|
$ stack build
|
2016-03-06 12:58:48 +01:00
|
|
|
|
|
|
|
Run.
|
|
|
|
|
|
|
|
$ stack exec vervis
|
2016-01-28 15:15:54 +01:00
|
|
|
|
2018-03-24 16:09:22 +01:00
|
|
|
Browse to `http://localhost:3000` and have fun!
|
|
|
|
|
|
|
|
`yesod devel` is another way to run the application, useful for rapid
|
|
|
|
development, but I haven't been using it and I'm not sure it works, possibly I
|
|
|
|
broke something along the way. But feel free to try!
|