Configuration¶
Braumeister pretty much only uses environment variables for configuration possibilities. You can use the export command to set them or even use .env file in src/bmapi directory.
Database¶
We must use a PostgreSQL database to store data for the application. You can specify the connection string using BRAUMEISTER_DB
$ export BRAUMEISTER_DB=postgresql://bm:bm@localhost:5432/bm
Events Queue¶
We use a queue system to be able to process jobs (ie.: Import Recipe, Batch Import, Import Brew Sessions… etc) in the background. Right now we support to Queue Back-end.
PostgreSQL
Use the existing database we use for data and store events in a table.
RabbitMQ
Need an other docker container to use RabbitMQ as backend.
You can specify which queue system to use with the BRAUMEISTER_QUEUE_TYPE. Accepted values are postgresql or rabbitmq.
$ export BRAUMEISTER_QUEUE_TYPE=postgresql
$ export BRAUMEISTER_QUEUE_TYPE=rabbitmq
RabbitMQ Back-end¶
If you use RabbitMQ as queue back-end. You must specify BRAUMEISTER_AMPQ variable.
$ export BRAUMEISTER_AMPQ=amqp://bm:bm@localhost:5672/
Environment¶
Used to know if the application is running in which environment.
- Possible values:
development
production
desktop-shell
$ export BRAUMEISTER_ENVIRONMENT=development
Source Root¶
To access some files from project. This is the path of bmapi.
$ export BRAUMEISTER_SOURCE_ROOT=src/bmapi/
User Email verification¶
To enable user verification, you must set 5 environment variables.
BRAUMEISTER_EMAIL_ENABLED: true or false. This enable the feature.
BRAUMEISTER_SMTP_SERVER_ADDR: Smtp Server address.
BRAUMEISTER_SMTP_SERVER_PORT: Smtp Server port.
BRAUMEISTER_SERVER_EMAIL: Email used as sender. Also the username for the smtp server.
BRAUMEISTER_SERVER_EMAIL_PASSWORD: Password for the sender email.
Application URI and CORS¶
Addresses to some part of the applications.
BRAUMEISTER_UI_URI: Address to bmui instance.
BRAUMEISTER_API_URI: Address to bmapi flask server.
To enable CORS, set this environment variable:
$ export BRAUMEISTER_CORS_ORIGIN=http://localhost:8080
Image(s) Upload¶
Path where images are saved need to be defined.
$ export BRAUMEISTER_IMAGE_UPLOAD_PATH=/bm/images/
File(s) Storage¶
Path where files are saved need to be defined.
$ export BRAUMEISTER_FILES_TO_DOWNLOAD_PATH=/bm/files/
Beta Mode¶
When Beta Mode is enabled, a key is needed to create a new account.
# beta mode on
$ export BRAUMEISTER_BETA_MODE=true
# beta mode off
$ export BRAUMEISTER_BETA_MODE=false
Admin Panel¶
When Admin Panel is enabled, your can access the admin panel at http://api_uri/admin/. You can only use admin account to access it.
# admin panel on
$ export BRAUMEISTER_ADMIN_PANEL_ENABLED=true
# admin panel off
$ export BRAUMEISTER_ADMIN_PANEL_ENABLED=false