Skip to content

Environment Variables

Ivan Zhang edited this page Oct 25, 2023 · 3 revisions

This package can be run without setting any environment variables. Environment variables are only required if you want to setup email and Slack alerts. Some environment variables allow you to customize the backend. You can set them in a .env file in the root directory of the repository. Here is a list of the environment variables that can be set:

PANDA_PATROL_URL=http://localhost:8000 # URL where requests from tests (i.e. create patrol, create patrol group, etc.) are sent to
PANDA_DATABASE_URL=sqlite:///panda_patrol.db # Database URL of the Panda Patrol backend. Note that you may need to install additional dependencies for your database if you are not using SQLite.

# These values are required in order to enable email alerts.
SMTP_SERVER=localhost # SMTP server to use for sending emails
SMTP_PORT=1025 # SMTP port to use for sending emails
SMTP_USER=panda # SMTP username to use for sending emails
SMTP_PASS=bamboolover # SMTP password to use for sending emails
PATROL_EMAIL=panda@patrol.com # Email address that Panda Patrol will send emails from

# This value is required in order to enable Slack alerts.
SLACK_WEBHOOK="https://hooks.slack.com/services/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" # Slack webhook URL to send alerts to
Clone this wiki locally