- Tested on
Python 3.8.3 - Python Packages:
src/requirements.txt. - OS Packages: PostgreSQL version 11 or greater,
libpq-dev,python3-devpackages. Please refer here.
- Git clone the repo and
cdinto it
$ git clone https://github.com/codeiiest-dev/RTB-CTF-Framework
$ cd RTB-CTF-Framework/- Create
virtual environmentto deal with dependencies and requirements.
$ virtualenv -p /usr/bin/python3 venv
$ source venv/bin/activate
$ cd src/- With
virtual environmentactivated, install requirements, init db,
[venv]$ pip install -r requirements.txt
[venv]$ export FLASK_APP="FlaskRTBCTF:create_app()"
[venv]$ chmod +x init_db.sh && ./init_db.sh # Only required on first run-
Now we can run our application,
- For development server,
[venv]$ python run.py
- Production server
[venv]$ ./runserver.sh
-
Define certain environment variables present in files
.envand.env_postgres. -
After having configured these environment variables, just execute,
$ docker-compose up