Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

codepointtku/viuhka-flask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PalveluViuhka

Table of Contents

Requirements

Database

  • Install MySQL or PostgreSQL (10+) and follow GUI instructions
  • Install Python3.7 and follow GUI instructions
  • Create user and database
  • Create .env file inside the project folder and add the following:
SQLALCHEMY_TRACK_MODIFICATIONS=1
SECRET_KEY=28419842198412894

SQL_USERNAME=database_username
SQL_PASSWORD=database_username_password
SQL_DATABASE=database_name
SQL_CHARSET=utf8mb4
SQL_PORT=database_port
SQL_DRIVER=mysql+pymysql

OR

SQL_DRIVER=postgresql+psycopg2

Depending on which database you chose to install.

Installation

(Point the system path to MySQL or PostgreSQL executable)

  • Create database via CLI

    • MySQL
      • mysql -h localhost -u username -p
      • CREATE DATABASE database_name;
      • quit;
    • PostgreSQL
      • psql -U postgres -c "CREATE ROLE database_user WITH ENCRYPTED PASSWORD 'password';"
      • psql -U postgres -c "CREATE DATABASE database_name;"
  • Windows

    • git clone https://github.com/digipointtku/viuhka-flask.git
    • cd viuhka-flask
    • python -m venv env
    • call env/scripts/activate
    • pip install -r requirements.txt
    • python main.py --create
    • python main.py --createsuperuser
    • python main.py --import
    • python main.py
  • Linux

    • $ git clone https://github.com/digipointtku/viuhka-flask.git
    • $ cd viuhka-flask
    • $ python3 -m venv env
    • $ source env/bin/activate
    • $ pip install -r requirements.txt
    • $ python main.py --create
    • $ python main.py --createsuperuser
    • $ python main.py --import
    • $ python main.py

Starting

  • Windows

    • call env/scripts/activate
    • python main.py
  • Linux

    • $ source env/bin/activate
    • $ python main.py

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published