From 1986d410ce5a33d66ca535626d4c25cb1ff86245 Mon Sep 17 00:00:00 2001 From: Stefan Dresselhaus Date: Mon, 5 Dec 2016 12:51:58 +0100 Subject: [PATCH] updated README and installation-instructions --- README.md | 35 +++++++++++++++++++++-------------- install.sh | 8 -------- 2 files changed, 21 insertions(+), 22 deletions(-) delete mode 100755 install.sh diff --git a/README.md b/README.md index e3fbb84..d892af6 100644 --- a/README.md +++ b/README.md @@ -9,24 +9,27 @@ At the moment there is nothing much to see here but a bit of playing around with 1. Install Stack like [http://docs.haskellstack.org/en/stable/README.html]() 2. install postgres (i use v. 9.3) - ``` + ```{.bash} sudo apt-get install -y postgresql-9.3 libpg-dev ``` 3. create user and database inside a psql-shell as user postgres: + ```{.bash} + sudo su postgres + psql ``` - CREATE ROLE neat; - ALTER ROLE neat LOGIN; + + ```{.sql} + CREATE ROLE neat WITH LOGIN PASSWORD 'neat'; CREATE DATABASE neat; GRANT ALL ON DATABASE neat TO neat; ``` -4. clone this repository, invoke the install.sh to also download the dependencies and install yesod-bin and build the project +4. clone this repository and install yesod-bin and build the project - ``` + ```{.bash} git clone https://github.com/Drezil/neat cd neat - ./install.sh stack setup stack install yesod-bin stack build @@ -34,12 +37,16 @@ At the moment there is nothing much to see here but a bit of playing around with 7. Get the current postgres-data-dump from `https://www.fuzzwork.co.uk/dump/postgres-latest.dmp.bz2` and restore it into the `neat` database: - ``` - sudo su postgres - cd /tmp - wget https://www.fuzzwork.co.uk/dump/postgres-latest.dmp.bz2 - bzip2 -d postgres-latest.dmp.bz2 - pg_restore -d neat postgres-latest.dmp - ``` + ```{.bash} + sudo su postgres + cd /tmp + wget https://www.fuzzwork.co.uk/dump/postgres-latest.dmp.bz2 + bzip2 -d postgres-latest.dmp.bz2 + pg_restore -d neat postgres-latest.dmp + ``` -8. run yesod in development-mode using stack with ```stack exec yesod devel``` +8. run yesod in development-mode using stack with `stack exec yesod devel` or use neat in production-mode with `stack exec neat` + +9. maybe(?) correct the access-rights in the neat-database to the neat-user. + + TODO: Find out how! diff --git a/install.sh b/install.sh deleted file mode 100755 index c0eeb7a..0000000 --- a/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -mkdir deps -cd deps -git clone https://github.com/Drezil/yesod-auth-oauth2 -git clone https://github.com/Drezil/eve-api -cd .. -#cabal install --only-dependencies --reorder-goals