-
Notifications
You must be signed in to change notification settings - Fork 6
Deployment
Donald Dong edited this page Feb 25, 2019
·
2 revisions
Deployment needs to be done for the frontend and backend separately and in this order. Deploying is a privileged operation so be careful.
We need to have access to those environment variables when we deploy
-
PARROT_AWS_KEY_ID: The AWS key ID. The deployment script requires it to connect to AWS resources. -
PARROT_AWS_KEY_SECRET: The AWS key secret. The deployment script requires it to connect to AWS resources. -
PARROT_CDN_BUCKET: Identify the s3 bucket we used for the CDN. -
PARROT_CDN_DIST: Identify the CloudFront distro we used for the CDN. -
PARROT_CDN_HOST: The CDN host for the static assets. -
PARROT_ENV: The development environment. Currently it can bedevelopment(default) orproduction. -
PARROT_HOST: Whitelist the main host in production.
Note: we don't want to share the values of many of these variables publicly (e.g. PARROT_AWS_KEY_ID and PARROT_AWS_KEY_SECRET) or there may be disastrous consequences.
To deploy the frontend, one must build the frontend first
npm run build -C frontend
Then run the script to deploy it.
python scripts/deploy_frontend.py
We need only need to push it to Heroku.
git push heroku master -f
where heroku is a git remote pointing to https://git.heroku.com/progteam-parrot.git.