Python3
Flask 3.x
Flask-wtf
Flask-sqlalchemy
Flask-migrate
Flask-session
Flask-babel
Flask-mail
Flask-caching
Flask-limiter
Flask-captcha2
Flask-shell-ipython
Redis
Mysql
Boostrap 5.3x
Html
Css
Js
highlight js
Jquery
python -m venv venv
linux-mac :
source ./venv/bin/active
windows:
./venv/Scripts/activate
pip install -r requirements.txt
mv config.sample.ini config.ini
change data in config.ini file (like database name, ...)
before running the below commands connect to you database and create a database (don't forget to put database name in config.ini file)
flask db init
flask db migrate
flask db upgrade
or just run MakeMigrate bash script (sudo chmod +x ./MakeMigrate then just run ./MakeMigrate)
or go create database your self via flask interactive shell
flask shell
from GeoIpCore.extensions import db
db.create_all() # database creation command
exit() # exit from ipython
python app.py
or
flask run [--debug(for debug) --reload(reload template) --port 8080(for port)]
[...] is optional
but there is no data in database so let add some data to database
warning : before running any of below script you should first fill up .env file and also migrate changes to db !
cd ./GeoIpUpdater
python fetchAndInsertdata.py
- this script automatically fetch a dataset from github
and then update database with new data
cd ./GeoIpUpdater
python InsertDataByFile.py
- this script insert data to database base on an input file ( file is required )