readme update

This commit is contained in:
nek0 2016-07-22 18:23:59 +02:00
parent 1934692d9b
commit 53795a448a

View file

@ -12,33 +12,21 @@ Visit the test instance at [eidolon.nek0.eu][eidolon]
####Build dependencies ####Build dependencies
A working Haskell capable environment. For that you will need `haskell-stack` and `cabal-install`, which A working Haskell capable environment. For that you will need `haskell-stack`
you can install with: and `cabal-install`, which you can install with:
```bash ```bash
sudo apt-get install haskell-stack cabal-install sudo apt-get install haskell-stack
``` ```
Shouldn't stack be available through your package repositories you can get it [here][stack]. Shouldn't stack be available through your package repositories you can get it
[here][stack].
Now you can set up your stack with `stack setup` and follow its instructions. This will install the Now you can set up your stack with `stack setup` and follow its instructions.
latest GHC Haskell compiler on your system. This will install the latest GHC Haskell compiler on your system.
update your package list with Additionally to Haskell and its dependencies you will need the following
software and libraries:
```bash
cabal update
```
and upgrade `cabal-install`, if necessary with the command
```bash
cabal install cabal-install
```
Now you should add `~/.cabal/bin` to your `PATH` environment variable.
Additionally to Haskell and its dependencies you will need the following software and libraries:
* alex * alex
* happy * happy
@ -50,19 +38,19 @@ Additionally to Haskell and its dependencies you will need the following softwar
which can be installed through which can be installed through
```bash ```bash
cabal install alex happy sudo apt-get install alex happy libmagick++-dev libpq-dev postgresql libmagickwand-dev
sudo apt-get install libmagick++-dev libpq-dev postgresql libmagickwand-dev
``` ```
####Elasticsearch dependencies ####Elasticsearch dependencies
Since version 0.0.5 there is an Elasticsearch integration for Eidolon. To Be able to run eidolon , you Since version 0.0.5 there is an Elasticsearch integration for Eidolon. To Be
need to install `elasticsearch` additionally with: able to run eidolon , you need to install `elasticsearch` additionally with:
```bash ```bash
sudo apt-get install elasticsearch sudo apt-get install elasticsearch
``` ```
On how to configure your elasticsearch server, look into the [elasticsearch documentation][elasticdocu]. On how to configure your elasticsearch server, look into the
[elasticsearch documentation][elasticdocu].
###Building ###Building
@ -78,40 +66,45 @@ build the source with
stack build stack build
``` ```
Everything should work automagically from there.
##Deploying ##Deploying
After compiling you will find an executable called `eidolon` in After compiling you will find an executable called `eidolon` in
`.stack-work/dist/<arch>/Cabal-<version>/build/eidolon/`, where `<arch>` is your system architecture and `.stack-work/dist/<arch>/Cabal-<version>/build/eidolon/`, where `<arch>` is
`<version>` your current cabal version. Copy or link it anywhere you want. The executable needs to be your system architecture and `<version>` your current cabal version. Copy or
accompanied by the folders `config` and `static` and their contents. It's best to copy them to your link it anywhere you want. The executable needs to be accompanied by the
folders `config` and `static` and their contents. It's best to copy them to your
desired destination. desired destination.
Also check `config/settings.yml` and set the values there accrding to your configuration. Especially the Also check `config/settings.yml` and set the values there accrding to your
settings for elasticsearch are vital. configuration. Especially the settings for elasticsearch are vital.
It may also be necessery to create a reverse proxy to your gallery. I would recommend using It may also be necessery to create a reverse proxy to your gallery. I would
[nginx](http://nginx.org/). recommend using [nginx](http://nginx.org/).
##Customizing ##Customizing
Unfortunately the gallery is not highly customizable, but you can change most of its appearance by Unfortunately the gallery is not highly customizable, but you can change most of
changing the files `static/css/style-*.css`. Especially the default background image can be changed by its appearance by changing the files `static/css/style-*.css`. Especially the
replacing `static/css/img/bg.jpg`. default background image can be changed by replacing `static/css/img/bg.jpg`.
##Starting ##Starting
You can start the gallery now by running the executable. You need to provide a settings file, normally You can start the gallery now by running the executable. You need to provide a
found in `config/settings.yml` settings file as argument, normally found in `config/settings.yml`
Since eidolon will block your console, I recommend wrapping a init-script around it. how you can do that Since eidolon will block your console, I recommend wrapping a init-script around
is written in my [blog](http://nek0.eu/posts/2014-10-23-Daemonize-a-yesod-app.html). it. how you can do that is written in my
[blog](http://nek0.eu/posts/2014-10-23-Daemonize-a-yesod-app.html).
##Migrations ##Migrations
###0.0.3-0.0.4 ###0.0.3-0.0.4
* do not start or restart your eidolon service before migration * do not start or restart your eidolon service before migration
* run migration script from your run location (where your `static` folder with all the images is located) * run migration script from your run location (where your `static` folder with
all the images is located)
* if you are building in a sandbox run * if you are building in a sandbox run
`runghc -package-db/full/path/to/sandbox/XXX-ghc-version-packages.conf.d `runghc -package-db/full/path/to/sandbox/XXX-ghc-version-packages.conf.d
/path/to/eidolon/Migrations/0.0.3-0.0.4/Migration.hs` /path/to/eidolon/Migrations/0.0.3-0.0.4/Migration.hs`
@ -121,7 +114,8 @@ is written in my [blog](http://nek0.eu/posts/2014-10-23-Daemonize-a-yesod-app.ht
###0.0.4-0.0.5 ###0.0.4-0.0.5
* run migration script from your run location (where your `static` folder with all the images is located) * run migration script from your run location (where your `static` folder with
all the images is located)
* if you are building in a sandbox run `runghc * if you are building in a sandbox run `runghc
-package-db/full/path/to/sandbox/XXX-ghc-version-packages.conf.d -package-db/full/path/to/sandbox/XXX-ghc-version-packages.conf.d
/path/to/eidolon/Migrations/0.0.4-0.0.5/Migration.hs` /path/to/eidolon/Migrations/0.0.4-0.0.5/Migration.hs`