yammat/README.md

52 lines
2.1 KiB
Markdown
Raw Normal View History

2015-04-07 02:21:05 +02:00
#yammat
2015-04-04 06:46:33 +02:00
Yet Another MateMAT
2015-04-07 02:21:05 +02:00
##Introduction
2015-04-04 06:46:33 +02:00
2015-04-07 02:21:05 +02:00
This project aims to be an implementation for a trust based POS for hackerspaces.
##Dependencies
###External dependencies
2015-04-16 05:03:28 +02:00
In order to build yammat you need the packages `cabal-install`, `ghc`, `libmagick++-dev` and `postgresql`. Furthermore you need the Haskell packages `alex` and `happy`. To install these enter `cabal install alex happy` into your command line.
2015-04-07 02:21:05 +02:00
###Internal dependencies
2015-04-07 02:23:42 +02:00
Before installing the internal dependencies it is best practice to put the project into a sandbox with `cabal sandbox init`.
2015-04-07 02:21:05 +02:00
All internal dependencies are in the file `yammat.cabal` and will be installed automagically with the command `cabal install --only-dependencies`.
##Building
2015-09-17 21:19:12 +02:00
To build this project enter `cabal configure && cabal build exe:yammat` into your command line
2015-04-07 02:21:05 +02:00
##Deployment
Copy or link the executable `dist/build/yammat/yammat` to your desired run location alongside with the folders `static` and `config`. The Folders should be copied, or you will get problems with your git pulls.
##Configuration
Check the configuration File `config/settings.yml`. Create Postgresql Databases according to these settings.
##Lift-Off
2015-04-09 16:30:20 +02:00
Run `./yammat config/settings.yml` in your desired run location. Finally point a reverse-proxy (something like nginx) at `http://localhost:3000` or any other port you configured in `config/settings.yml`.
2015-04-07 02:21:05 +02:00
For better control You can wrap an init script around this. How to do this is described [in my blog][blog].
[blog]: http://nek0.eu/posts/2014-10-23-Daemonize-a-yesod-app.html
2015-09-17 16:21:38 +02:00
##Migrations
###0.0.0-0.0.1
2015-09-17 21:16:10 +02:00
* Delete column `alt_time` from table `avatar` in your Database with `alter table "avatar" drop column "alt_time";`
* Start yammat normally to fill database with dummy data and stop it again
2015-10-12 02:44:59 +02:00
* Run migration script
* if you have built yammat with a sandbox, run `runghc -package-db/full/path/to/sandbox(XXX-ghc-version-packages.conf.d /path/to/yammat/Migration/0.0.0-0.0.1/Migration.hs`
* Note: No space between the option `-package-db` and its argument
* without sandbox: `runghc /path/to/yammat/Migration/0.0.0-0.0.1/Migration.hs`
2015-09-17 21:16:10 +02:00
* Enjoy your freshly migrated Matemat