OED Environment Variables
The OED server is configured via environment variables. These are normally set in the
docker-compose.yml
file located in the main OED directory. Developers generally do not need to
change these values. Production installations generally do need to change some values as described in the installation directions.
The environment variables are:
- OED_PRODUCTION: 'yes' if running "for realsies" on a server (live site), 'no' otherwise (normally
development).
- OED_SERVER_PORT: The port that the server should run on. 3000 is a good default choice.
- OED_DB_USER: The user that should be used to connect to postgres.
- OED_DB_DATABASE: The database you just created, so likely oed.
- OED_DB_TEST_DATABASE: The test database you just created, so likely oed_testing.
- OED_DB_PASSWORD: The password for your postgres user.
- OED_DB_HOST: The host for your postgres db, likely database where docker will set the needed value since
database is the name of the service for the database.
- OED_DB_PORT: The port for your postgres db, likely 5432.
- OED_TOKEN_SECRET: Token for authentication. Generate something secure and random where you should never need
to use this value.
- OED_LOG_FILE: Path to the log file, defaults to ./log.txt.
- OED_MAIL_METHOD: Method of sending mail. Supports "secure-smtp" and "none". Case insensitive.
- OED_MAIL_IDENT: Username for gmail, domain for mailgun. Ex: user@example.com
- OED_MAIL_CREDENTIAL: Password for gmail, or API key for mailgun.
- OED_MAIL_FROM: From address for email. If using GMail, make sure this is set.
- OED_MAIL_TO: Who gets error, warning (log) e-mail. Ex: admin@example.com
- OED_MAIL_ORG: Organization name, used in e-mail subject line
- OED_SITE_READING_RATE: The expected rate the meters provide data and impacts when the line graphic goes to
original meter data.
- OED_TEST_SITE_READING_RATE: Similar to OED_SITE_READING_RATE but used when running tests.