Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.32 KB

File metadata and controls

55 lines (38 loc) · 1.32 KB

Installation / How To Use

Requirements

  • Tested on Python 3.8.3
  • Python Packages: src/requirements.txt.
  • OS Packages: PostgreSQL version 11 or greater, libpq-dev, python3-dev packages. Please refer here.

Build locally and run (Development)

  1. Git clone the repo and cd into it
$ git clone https://github.com/codeiiest-dev/RTB-CTF-Framework
$ cd RTB-CTF-Framework/
  1. Create virtual environment to deal with dependencies and requirements.
$ virtualenv -p /usr/bin/python3 venv
$ source venv/bin/activate
$ cd src/
  1. With virtual environment activated, 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
  1. Now we can run our application,

    • For development server,
    [venv]$ python run.py
    • Production server
    [venv]$ ./runserver.sh

Docker (Production)

  1. Define certain environment variables present in files .env and .env_postgres.

  2. After having configured these environment variables, just execute,

    $ docker-compose up