IMPORTANT: This readme file is not finished yet.
- Python 3.5
- MySQL
Clone the repository and install Python Virtual Environment in it:
git clone https://github.com/fmfi-svt/candle-ng.git
cd candle-ng
python3 -m venv venv
Activate the environment and install dependencies:
$ source venv/bin/activate
(venv) $ python3 -m pip install -r requirements/requirements.txt
During development, install requirements/dev_requirements.txt
Generate a Flask Secret key. It's easy with Python:
>>> import secrets
>>> secrets.token_urlsafe(16)
Setup a MySQL database with corresponding tables (check DB model diagram). Email us at [email protected] and we will send you a MySQL dump-file from old Candle instance you can work with.
Create a file called ".env" in the root folder (candle-ng/) and save here these configuration values:
FLASK_APP=run.py
FLASK_ENV=YOUR_ENVIRONMENT_GOES_HERE
SECRET_KEY=YOUR_SECRET_KEY_GOES_HERE
SQLALCHEMY_DATABASE_URI=YOUR_DATABASE_URI_GOES_HERE
- Replace
YOUR_ENVIRONMENT_GOES_HERE
withdevelopment
orproduction
. - Replace
YOUR_SECRET_KEY_GOES_HERE
with your secret key. - Replace
YOUR_DATABASE_URI_GOES_HERE
with your database URI, for example:mysql+pymysql://username:password@server/db
.
Run the app:
(venv) $ flask run