Grey College JCR Website
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Grey College JCR Website Build Status

This is the code running the Grey JCR website. Making the website open source will hopefully provide an oportunity for Grey JCR members to get involved in the website. Feel free to install this on your local machine and play around with it.


This application follows 12 factor principles and runs inside a docker container defined in the Dockerfile. The external dependencies are defined in docker-compose.yml. Instrcutions on how to install, run and develop this application are detailed below.

1. Clone this project

Either use the command git clone from your command line or use the download link and extract the zip file.

2. Install Docker and Docker Compose

These are the only two requirements for this projects. Instructions on how to install them can be found here.

There appears to be a bug in docker-compose v1.19.0 so v1.18.0 is recommended.

3. Create Environment File

Some environment variables are passed in to the container in the docker-compose.yml, others are listed in a file called ".env" in the main directory of the site. You will need to create this file and define the following variables:

# This is used for storing user sessions

# Details for using the paypal API

# Your Durham details, these are used to set you up as the website editor in your local installation
CIS_NAME=Ben Willis

# These are used by the website to send booking confirmation emails etc

# This is used to set the docker container timezone

4. Set up the Postgres database

To set up the database you need to create the tables and add your user (defined in .env) as the website editor. To do this first run docker-compose up -d to start the app and services in the background, then run:

  1. docker-compose run app npm run migrate-postgres - this will create the required tables in the database
  2. docker-compose run app npm run seed-postgres - this will add the user defined in the .env file as the website editor

Note these steps are only required on installation and if you delete the postgres-data directory.

5. Running the app

Simply run docker-compose up to start the app in the foreground. Then visit "localhost:3000" in your browser to view the site. To stop the app simple press ctrl+c.

Development Tips

Here are a few tips and tricks that will allow you to develop:

  • If you make any changes to any config or any of the source code you will need to run docker-compose build to rebuild the images
  • You can run the app in the background using docker-compose up -d. You can then follow the logs with docker-compose logs -f and stop the app with docker-compose down.
  • If you need to gain access to the postgres database cli run docker-compose exec postgres psql -U grey.

More to be added...


There are currently some tests in the test directory which can be run with something like docker-compose run app npm run test.


If you want to get involved in the website feel free to email me at or the current website editor if you have any questions!


The MIT License (MIT)