No description
Find a file
2015-10-19 16:31:42 +02:00
app changed modes 2015-10-03 05:55:55 +02:00
config oops 2015-10-18 05:30:04 +02:00
deploy changed modes 2015-10-03 05:55:55 +02:00
Handler switched to bootstrap3 2015-10-19 16:30:31 +02:00
messages changed modes 2015-10-03 05:55:55 +02:00
Migrations oops. my bad. wrong index. 2015-10-19 02:10:31 +02:00
Settings changed modes 2015-10-03 05:55:55 +02:00
static switched to bootstrap3 2015-10-19 16:30:31 +02:00
templates better preview scaling 2015-10-19 16:31:42 +02:00
tests changed modes 2015-10-03 05:55:55 +02:00
.gitignore changed modes 2015-10-03 05:55:55 +02:00
Application.hs starting out with elasticsearch. not working for now 2015-10-16 15:32:47 +02:00
devel.hs changed modes 2015-10-03 05:55:55 +02:00
eidolon.cabal switched to bootstrap3 2015-10-19 16:30:31 +02:00
Foundation.hs switched to bootstrap3 2015-10-19 16:30:31 +02:00
Helper.hs switched to bootstrap3 2015-10-19 16:30:31 +02:00
Import.hs switched to bootstrap3 2015-10-19 16:30:31 +02:00
LICENSE.md changed modes 2015-10-03 05:55:55 +02:00
Model.hs starting out with elasticsearch. not working for now 2015-10-16 15:32:47 +02:00
README.md updated readme to version 0.0.5 2015-10-18 04:33:02 +02:00
Settings.hs better searchhost configuration 2015-10-18 02:52:27 +02:00

#eidolon

##Introduction

A image gallery service written in Haskell as a yesod webapp.

Visit the test instance at eidolon.nek0.eu

##Installation

###Dependencies

####Build dependencies

A working Haskell capable environment. For that you will need haskell-stack and cabal-install, which you can install with:

sudo apt-get install haskell-stack cabal-install

Shouldn't stack be available through your package repositories you can get it here.

Now you can set up your stack with stack setup and follow its instructions. This will install the latest GHC Haskell compiler on your system.

update your package list with

cabal update

and upgrade cabal-install, if necessary with the command

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
  • happy
  • libmagick++-dev

which can be installed through

cabal install alex happy
sudo apt-get install libmagick++-dev

####Elasticsearch dependencies

Since version 0.0.5 there is an Elasticsearch integration for Eidolon. To Be able to run eidolon , you need to install elasticsearch additionally with:

sudo apt-get install elasticsearch

On how to configure your elasticsearch server, look into the elasticsearch documentation.

###Building

get the source with

git clone https://github.com/nek0/eidolon.git

It's generally a good idea to create a sandbox for compiling. To do so cd into the project directory and invoke

cabal sandbox init

If the sandbox generation fails, please make sure, you are using the latest version of cabal istall.

Then install all dependencies with the following command. This may lead you into dependency hell, as I am working with very new libraries. I am trying my best to avoid this.

cabal install --only-dependencies

After installing all dependencies you can configure and build the software with

cabal configure
cabal build

##Deploying

After compiling you will find an executable called eidolon in dist/build/eidolon/. Copy or 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.

Also check config/settings.yml and set the values there accrding to your 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 nginx.

##Customizing

Unfortunately the gallery is not highly customizable, but you can change most of its appearance by changing the files static/css/static-*.css. Especially the default background image can be changed by replacing static/css/img/bg.jpg.

##Starting

You can start the gallery now by running the executable. You need to provide a settings file, 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 is written in my blog.

##Migrations

###0.0.3-0.0.4

  • 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)
    • if you are building in a sandbox run 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
      • Note: No space between the option -package-db and its argument
    • without sandbox: runghc /path/to/eidolon/Migrations/0.0.3-0.0.4/Migration.hs
  • start or restart your eidolon service

###0.0.4-0.0.5

  • 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 -package-db/full/path/to/sandbox/XXX-ghc-version-packages.conf.d /path/to/eidolon/Migrations/0.0.4-0.0.5/Migration.hs
      • Note: No space between the option -package-db and its argument
    • without sandbox: runghc /path/to/eidolon/Migrations/0.0.4-0.0.5/Migration.hs
  • start or restart your eidolon service

##Acknowledgements: