The PyCascades Code of Conduct Hotline
Python 3.6+ because F strings are the best strings.
- Create and activate a virtual environment.
- Run
pip install -r requirements.txt
to install the dependencies - (Optional) Add the "Incoming Webhooks" integration to your slack team of choice
- Follow the configuration instructions and write down your WebHook URL
- Set the following environment variables:
COC_NUMBERS
: A comma separated list of phone numbers prefixed with+
, numbers should include country code.COC_HTTP_SCHEME
: eitherhttp
orhttps
, we recommend deploying with lambda which will provide https for you.COC_SLACK_URL
: (Optional) The WebHook URL provided by the Incoming Webhooks Slack integration.
- Run
python coc-hotline.py
This tool was built to be run on AWS Lambda, but could easily be adapted to run anywhere you can run Python 3.6+. To deploy to AWS Lambda follow the below instructions:
- Create an AWS account and configure your AWS credentials file.
- Create and activate a virtual environment.
- Run
pip install -r requirements.txt
- Run
zappa init
- Answer all of the questions asked.
- Add an
environment_variables
attribute to your zappa config and fill out the environment variables listed in the installation instructions above. - Run
zappa deploy [your environment name here]