From 9d26a9393288dce105c6abef53fb081a11c50fd8 Mon Sep 17 00:00:00 2001
From: Robin Sonnabend <robin@fsmpi.rwth-aachen.de>
Date: Sat, 17 Feb 2018 11:18:23 +0100
Subject: [PATCH] Add development setup guide

---
 DEVELOPMENT.md    | 41 +++++++++++++++++++++++++++++++++++++++++
 config.py.example |  2 ++
 2 files changed, 43 insertions(+)
 create mode 100644 DEVELOPMENT.md

diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
new file mode 100644
index 0000000..37e09c5
--- /dev/null
+++ b/DEVELOPMENT.md
@@ -0,0 +1,41 @@
+# Development Guide
+
+## Setup
+
+* Install python3 and virtualenv
+* Create a virtualenv and install the requirements
+
+```
+virtualenv -p python3 venv
+source venv/bin/activate
+pip install -r requirements.txt
+```
+
+* Create a database (with sqlite, postgres, …)
+* Create a config file
+
+```
+cp config.py.example config.py
+```
+
+* Edit the config file to your needs
+  - Don't forget to enter your database connection
+  - And your authentication backend
+  - And deactivate everything you do not use
+
+* Fill your database
+
+```
+./server.py db upgrade
+```
+
+## Running the program
+
+```
+source venv/bin/activate
+./server.py runserver
+```
+
+The website will run on `localhost:5000`.
+
+
diff --git a/config.py.example b/config.py.example
index 91efe38..181aed8 100644
--- a/config.py.example
+++ b/config.py.example
@@ -1,5 +1,7 @@
 # (local) database
 SQLALCHEMY_DATABASE_URI = "postgresql://user:password@host/database" # change this
+#SQLALCHEMY_DATABASE_URI = "mysql://user:password@host/database"
+#SQLALCHEMY_DATABASE_URI = "sqlite:///path/to/database.db"
 SQLALCHEMY_TRACK_MODIFICATIONS = False # do not change
 
 SECRET_KEY = "something random" # change this
-- 
GitLab