-
Notifications
You must be signed in to change notification settings - Fork 21
Setup
Andrea Peltrin edited this page Jul 6, 2023
·
11 revisions
First, install Coldsweat with pip
or clone the repository into your installation directory, like explained in the main Readme file.
Coldsweat to run needs two information:
- Where to store data. See Peewee's Database URL examples to configure your database of choice.
- Which secret key to use when generating session cookies to keep web users logged-in. See Flask documentation about secret keys on tips to pick secure values.
Such information can be specified in two ways.
By adding a config.toml
file, using the TOML format. This boils down to write a series of key-value pairs like the example below:
DATABASE_URL="mysql://username:[email protected]:3306/coldsweat"
SECRET_KEY="192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf"
Another approach is using environment variables and assign their values to names prefixed by FLASK_
:
export FLASK_DATABASE_URL="mysql://username:[email protected]:3306/coldsweat"
export FLASK_SECRET_KEY="192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf"
Please take look at the Deploy page.