Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1.44 KB

README.md

File metadata and controls

55 lines (40 loc) · 1.44 KB

Candle (New generation)

IMPORTANT: This readme file is not finished yet.

Requirements

  • Python 3.5
  • MySQL

Install & Run (Linux)

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
  1. Replace YOUR_ENVIRONMENT_GOES_HERE with development or production.
  2. Replace YOUR_SECRET_KEY_GOES_HERE with your secret key.
  3. Replace YOUR_DATABASE_URI_GOES_HERE with your database URI, for example: mysql+pymysql://username:password@server/db.

Run the app:

(venv) $ flask run