Skip to content

Commit

Permalink
Merge pull request #144 from fsinfuhh/feat/updateInstallReadme
Browse files Browse the repository at this point in the history
update install readme
  • Loading branch information
timonegk authored Dec 19, 2023
2 parents cb97e9f + 55d4b9d commit 6c88ed8
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ MAFIASI_OPENID_SYNC_SUPERUSER=false
MAFIASI_SECRET_KEY=django-insecure-foobar123
MAFIASI_EMAIL_HOST=mailhost.informatik.uni-hamburg.de
MAFIASI_EMAIL_ADDRESSES_PASSWORD=
MAFIASI_DB=postgres://mafiasi-dashboard:mafiasi-dashboard@localhost/mafiasi-dashboard
MAFIASI_DB=postgres://mafiasi_dashboard:mafiasi_dashboard@localhost/mafiasi_dashboard
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MAFIASI_SECRET_KEY=django-insecure-foobar123
MAFIASI_EMAIL_HOST=mailhost.informatik.uni-hamburg.de
MAFIASI_EMAIL_ADDRESSES_PASSWORD=
MAFIASI_OPENID_CLIENT_SECRET=
MAFIASI_DB=postgres://mafiasi-dashboard:mafiasi-dashboard@localhost/mafiasi-dashboard
MAFIASI_DB=postgres://mafiasi_dashboard:mafiasi_dashboard@localhost/mafiasi_dashboard

MAFIASI_ENABLE_VAULT_INTEGRATION=True
MAFIASI_VAULT_URL=https://vault.example.com/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ staticfiles
.pyenv
venv
db-data
dev_db/
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@ docker build -t mafiasi-dashboard .

### From Source

Just install the dependencies, copy example settings and services, migrate database and
execute make:
To install Mafiasi from source, you need the following apt packages: `libgpgme-dev` and `libgraphviz-dev`

Install the dependencies and start and migrate database:
```
pipenv install
cp mafiasi/settings.py.example mafiasi/settings.py
./start_dev_db.sh
pipenv run ./manage.py migrate
make
```

We try to keep these installation instructions up to date, but we can't
guarantee.

To run Mafiasi, just start the database and Mafiasi:
```
./start_dev_db.sh
pipenv run ./manage.py runserver
```

# Notes

Expand Down
19 changes: 19 additions & 0 deletions start_dev_db.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/bash
set -e

export USER=mafiasi_dashboard
export PASS=$USER
export DB=$USER
export STORE_DIR=$(realpath $(dirname $(dirname $0)))/dev_db

mkdir -p $STORE_DIR
echo "Exposing postgres database on psql://$USER:$PASS@localhost:5432/$DB"
exec docker run \
-it \
-e POSTGRES_USER=$USER \
-e POSTGRES_PASSWORD=$PASS \
-e POSTGRES_DB=$DB \
-v $STORE_DIR:/var/lib/postgresql/data \
-p 5432:5432 \
$@ \
docker.io/postgres

0 comments on commit 6c88ed8

Please sign in to comment.