After deployment you will need to run heroku pg:psql < pcode_table.sql
to get the postcode search feature to work.
- This repository contains all the code and instructions you need to instantly run your own version of the Neighbourly doorknocking tool
- The deploy button above will create an app with its own database for supporter details, including the areas of the map they claim. By default the address and walklist data will be served by pre-existing backend infrastructure.
- Optionally, if you would like to run your own version of the Neighbourly backend infrastructure you can follow the instructions available in this google doc.
- Those instructions outline all steps required to create the full Neighbourly backend using Amazon Web Services (AWS).
- The google doc explains how to deploy the code and other files in this repository, which includes all necessary deployment scripts and Lambda functions: https://github.com/TheCommonsLibrary/neighbourly-serverless.
-
Download the code in this repository (click the "Clone or download" button above, then select "Download ZIP"). Once your download completes, unzip the folder.
-
Open the “Terminal” application on your Mac (or the equivalent application for your Operating System) and navigate to your new Neighbourly folder on the command line by following this instruction:
- Type
cd
, press the spacebar, then drag and drop the Neighbourly folder onto the command line (like this example). It should result in output something like this:cd /Users/JoeBloggs/Desktop/Neighbourly
- Type
-
Install all project dependencies with the following commands:
gem install bundler -v 1.15.3 bundle install
-
Create the database by running the following commands:
psql CREATE DATABASE neighbourly ENCODING 'UTF_8'; CREATE DATABASE neighbourly_test ENCODING 'UTF_8'; \q
-
Run the database migrations with the following commands:
DATABASE_URL="postgres://localhost/neighbourly" rake db:migrate psql neighbourly < pcode_table.sql
-
Create a new
.env
file in the project root and set the environment variables according to the examples in.env.example
-
Finally start the application by running the following command:
ruby app.rb
-
Inside the
public/images
folder, replace thehome-background.jpg
with a photo of your choice. This is the image used on the main login screen. -
Inside the
public/images
folder, replace thehome-logo.png
with the logo you would like to appear in the top-left of the main login screen.- Ideally you should use the inverse version of your logo (e.g. white, with a transparent background), given this logo appears on top of a photo.
- A square version of your logo will work well. For reference, the current example logo has a 5:4 aspect ratio.
-
Inside the
public/images
folder, replace themap-logo.png
with your primary logo to appear in the top-left of the main map screen.- A square version of your logo will work well. For reference, the current example logo has a 5:4 aspect ratio.
-
Update the
favicon.ico
image inside thepublic
folder.