Tools for deploying Polis static assets to S3.
- python 3.8+
- aws cli
- heroku cli
heroku login
git push <heroku-remote> edge:main
Replace <heroku-remote>
with the appropriate heroku remote, e.g. heroku-preprod
from the root of the project:
make ENV_FILE=<env-file> PROD build-web-assets
Log into AWS SSO and configure your AWS CLI with the appropriate profile.
aws configure sso
follow the prompts to configure your profile. e.g.
SSO session name: polis-deploy
SSO start URL: [aws-start-url]
SSO region: us-east-1
SSO registration scopes: [enter for default]
CLI default client Region: us-east-1
CLI default output format: json
CLI profile name: polis-deploy
export AWS_PROFILE=polis-deploy
aws sso login
# Verify that you are logged in
aws sts get-caller-identity
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -r dev-requirements.txt
python deploy-static-assets.py --bucket <bucket-name>
Replace <bucket-name>
with the appropriate bucket name, e.g. edge.static-assets.pol.is
Or from the root of the project:
python deploy/deploy-static-assets.py --bucket <bucket-name>