4 So, you're ready to contribute to pgweb, and you want to set up a
5 local working copy of the website code, so you have something to work
6 with. Here's a quick step-by-step on how to do that:
8 #. Make sure you have downloaded and installed django *version 1.8*
9 You will also need the dependencies *psycopg2*, *yaml*
10 and *markdown* (these are python libraries, so prefix python- for Debian
11 packages, for example). There is a `requirements.txt` file available
14 #. Make sure you have downloaded and installed PostgreSQL (tested only
15 with *version 9.0* and later, but doesn't use any advanced
16 functionality so it should work with other versions)
18 #. Create a database in your PostgreSQL installation called pgweb
19 (other names are of course possible, but that's the standard one)
21 #. Create a file called settings_local.py, located in the pgweb
22 directory (next to settings.py). This file will contain any settings
23 you override from the main settings one. Normally, you will want to
24 override the following::
28 SITE_ROOT="http://localhost:8000"
29 SESSION_COOKIE_SECURE=False
30 SESSION_COOKIE_DOMAIN=None
32 #. In the pgweb directory run the following command to create all
33 tables and indexes, as well as create a superuser for your local
38 #. A few functions are required, or at least recommended in order to
39 test all of the system. The SQL scripts in the directory sql/ needs
40 to be run in the database. Note that for a local dev install
41 without varnish frontends, you should use the *varnish_local.sql*
42 script, and not use the *varnish.sql* script.
44 #. To load some initial data for some tables (far from all at this
45 point), in the pgweb directory, run the following command::
47 ./load_initial_data.sh
48 #. At this point, you're ready to get started. Start your local server
52 #. Now load up the website by going to http://localhost:8000
56 The plan is to make it possible to get a good snapshot of the actual
57 PostgreSQL website to do development work on, including parts from the
58 database. However, there are a number of privacy issues that need to
59 be figured out before we can do that (we don't want to put a
60 database-dump containing thousands of well confirmed email addresses
61 easily available for download, for example). Any suggestions on
62 exactly how to get this done are much appreciated.