Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.5 KB

INSTALLATION.md

File metadata and controls

57 lines (39 loc) · 1.5 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/abs0lut3pwn4g3/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. You need docker and docker-compose installed on your host machine. (refer here and here)

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

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

    $ docker-compose up