summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorMark Wong2019-05-29 17:18:00 +0000
committerMark Wong2019-05-29 17:18:00 +0000
commitcc41d3dba7d11cdd589a83f1284c0a47b444b7f6 (patch)
treeff6c6799cd550c74f4159b91dd8e3ea56da6f9a2 /readme.md
parentcf7a951b9580e6839464194547efe28757741e98 (diff)
parent9f7c200c61ae0d8c44155404d21fb7f286ace32b (diff)
Merge branch 'master' of github.com:PGPerfFarm/pgperffarmHEADmaster
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md63
1 files changed, 63 insertions, 0 deletions
diff --git a/readme.md b/readme.md
new file mode 100644
index 0000000..a6da04f
--- /dev/null
+++ b/readme.md
@@ -0,0 +1,63 @@
+# PostgreSQL Performance Farm
+
+This repository contains the code for the PostgreSQL Performance Farm.
+
+IMPORTANT: migrating from Python2 to Python3 is in progress, hence why code might not work - for any issues feel free to contact @ila at [email protected]
+
+----
+
+#### Configuration
+
+```bash
+refs/remotes/origin/masterweb/
+```
+
+The web/ directory contains the Django application that forms the basis of the website. In order to run the site, you will need to setup a Python `virtualenv`, e.g:
+
+```bash
+$ sudo pip install virtualenvwrapper
+$ source /usr/local/bin/virtualenvwrapper.sh
+$ mkvirtualenv pgperffarm
+```
+
+For ease of future use, configure virtualenvs from your `.bash_profile`:
+
+```bash
+$ echo "source /usr/local/bin/virtualenvwrapper.sh" >> ~/.bash_profile
+```
+
+To activate the environment in future sessions, run:
+
+```bash
+$ workon pgperffarm
+```
+
+Then, install the required modules. Note that we use Django 1.8 as that's what is currently supported on the postgresql.org infrastructure:
+
+```bash
+$ PATH=$PATH:/usr/local/pgsql/bin pip install -r web/requirements.txt
+```
+
+Next, create a `settings_local.py` file::
+
+```bash
+$ cp web/pgperffarm/settings_local.py.in web/pgperffarm/settings_local.py
+```
+
+Edit the file and change the database configuration and other settings to suit your environment. Make sure you create the required database and user account on your PostgreSQL server.
+
+Finally, synchronise the database:
+
+```bash
+$ cd web
+$ python manage.py makemigrations
+$ python manage.py migrate
+```
+
+That should be all. To test, run the following command and point a browser at the URL shown:
+
+```bash
+$ python manage.py runserver
+```
+
+You should see the index page of the application. \ No newline at end of file