- Create a new API key and a new OAuth 2.0 client ID in the Credentials section of the Google Cloud APIs & Services. Make sure the client ID is restricted to
http://localhost:8080
. - Enable APIs for YouTube, Google+, Maps.
- Create a settings file
appengine/src/greenday_core/settings/local.py
based onappengine/src/greenday_core/settings/local.py.sample
and fill the API keys as per above. - Create a settings file
appengine/src/greenday_core/settings/test.py
based onappengine/src/greenday_core/settings/test.py.sample
and fill the API keys as per above. docker-compose build
docker-compose up
docker-compose exec montage grunt build
- Navigate to http://localhost:8080 for the app
- Navigate to http://localhost:8000 for the admin UI
docker-compose exec montage bash
to get inside the running container. The Python virtual environment is automatically activated for you.
python bin/manage.py shell
and other Python / Django commands are available- Editing the Python code from your code editor will automatically reflect in the running service
npm run test:backend
to run backend tests
grunt watch
to watch code changes in JavaScript / HTML and rebuild the packagenpm run test:frontend
to run unit tests
All connections to the Cloud SQL instances are made over SSL. You will need to set yourself up with a private key to access this.
- Go to the project console and choose a database
- Under "SSL" click "Create a client certificate"
- Enter a name you can be identified by as the cert name
- Download
client-key.pem
,client-cert.pem
andca-cert.pem
(this is namedserver-ca
when you download it from the console. You will need to rename it toca-cert.pm
when you store it locally) and save them in{project root}/keys/(qa|live)/
. - Click "Restart and Close". This RESTARTS the SQL instance but is necessary for the certificate to be usable.
- Test connection using
./bin/manage.py dbshell --settings=greenday_core.settings.(qa|live)
QA should mirror the develop
branch. QA has a fixed version, called "qa".
- Copy
appengine/auth.json.example
toappengine/auth.json
- Run
npm run full-deploy-qa
PS: At Meedan, a deployment to QA happens automatically when a push happens to develop
. You can also call it from Jenkins (job montage-develop
) or from Slack using Hubot: @hu deploy-montage-qa
.
Live should mirror the master
branch.
- If the version needs changing then update file
VERSION
- Merge develop into master and push
- Copy
appengine/auth.json.example
toappengine/auth.json
- Run
npm run full-deploy-live
PS: At Meedan, you can deploy from Jenkins (job montage-master
) or from Slack using Hubot: @hu deploy-montage-live
.