You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* OS Packages: PostgreSQL version 11 or greater, `libpq-dev`, `python3-dev` packages. Please refer [here](https://tutorials.technology/solved_errors/9-Error-pg_config-executable-not-found.html).
8
8
9
-
### Build locally and run
9
+
### Build locally and run (Development)
10
10
11
11
1. Git clone the repo and `cd ` into it
12
12
@@ -22,20 +22,33 @@ $ source venv/bin/activate
22
22
$ cd src/
23
23
```
24
24
25
-
3. With `virtual environment` activated, install requirements, init db and run !
25
+
3. With `virtual environment` activated, install requirements, init db,
26
26
27
27
```bash
28
28
[venv]$ pip install -r requirements.txt
29
-
[venv]$ python create_db.py # Only required on first run
30
-
[venv]$ python run.py
29
+
[venv]$ chmod +x init_db.sh && ./init_db.sh # Only required on first run
31
30
```
32
31
33
-
> Warning: If you make any change to [`config.py`](https://github.com/abs0lut3pwn4g3/RTB-CTF-Framework/blob/master/src/FlaskRTBCTF/config.py) logging/config class/score settings. It's highly recommended to create a new DB instance.
32
+
4. Now we can run our application,
34
33
35
-
### Docker
34
+
- For development server,
36
35
37
-
> Note: The Docker support is not tested for production yet. It's recommended to use Heroku for production.
36
+
```bash
37
+
[venv]$ python run.py
38
+
```
38
39
39
-
```bash
40
-
$ docker-compose up
41
-
```
40
+
- Production server
41
+
42
+
```bash
43
+
[venv]$ ./runserver.sh
44
+
```
45
+
46
+
### Docker (Production)
47
+
48
+
1. Define certain environment variables present in files `.env` and `.env_postgres`.
49
+
50
+
2. After having configured these environment variables, just execute,
0 commit comments