AlisdairO / pgexercises

PostgreSQL Exercises web site code
Other
400 stars 62 forks source link

PostgreSQL Exercises

This is the code for the SQL tutorial site PostgreSQL Exercises. It's made using a simple static site generator and some template html files.

Directories/Files under this project root:

Instructions to get a dev environment working:

Install nginx, apache tomcat 7, PostgreSQL, ant, perl.

Set a password

Modify database/clubdata.sql and database/context.xml to set a password of your choosing

Set up your database

su - postgres
cd $PGEXERCISES_HOME/database
psql -f clubdata.sql

Set up nginx

Configure SQL Forwarder servlet

Run the pgexercises build

The following should build your html files in site/website/questions:

cd $PGEXERCISES_HOME/scripts
./processdocs.pl ../ 1

Start everything up

Start postgres, tomcat, and nginx if not already started. Hopefully you should be able to see a web page at your nginx port (default localhost:80)!