CS 242 fall 2016 project.
Create a new project in the Google Developers Console, enable the Google Maps Geocoding API and the Google Maps JavaScript API, and create a new API Key in the Credentials tab.
Create a new app in the Facebook Developers Console, enable and setup Facebook Login for the app, and get the app ID and app secret.
Create a new S3 bucket in the AWS S3 Console. Set the constant S3_BUCKET_NAME
in anytownlib/user_profiles.py
to the name of that S3 bucket.
Create a file postgres_credentials.txt
in the project's root directory. This file will consist of two non-empty lines:
- The Postgres username credential.
- The Postgres password credential.
Then, a database named anytown-mapper
must be made and the tables with schemas specified in schema.sql
configured. Additionally, this script must be run in the Postgres console, replacing the placeholders with the appropriate values.
INSERT INTO credentials VALUES ('google', 'INSERT_GOOGLE_API_KEY_HERE');
INSERT INTO credentials VALUES ('facebook_client_id', 'INSERT_FACEBOOK_CLIENT_ID_HERE');
INSERT INTO credentials VALUES ('facebook_client_secret', 'INSERT_FACEBOOK_CLIENT_SECRET_HERE');
INSERT INTO credentials VALUES ('aws_client_id', 'INSERT_AWS_CLIENT_ID_HERE');
INSERT INTO credentials VALUES ('aws_client_secret', 'INSERT_AWS_CLIENT_SECRET_HERE');
Finally, install the Python dependencies using pip install -r requirements.txt
- Create a heroku app and set these environment variables:
HEROKU_PROD
to any true-ish valueGOOGLE_API_KEY
to Google API KeyFB_CLIENT_ID
to Facebook Graph API Client IDFB_CLIENT_SECRET
to Facebook Graph API Client SecretAWS_CLIENT_ID
to AWS API Client IDAWS_CLIENT_SECRET
to AWS API Client Secret
- Provision a Postgres instance to your Heroku app.