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
* update to conform with flake8/PEP8 | #47
* Update README.md
* Create CODE_OF_CONDUCT.md (#51)
* 1. psf/black formatting with travis checks, 2. adjust docs, create CONTRIBUTING.md, 3. helper fns for creating admin pass and secret key by itself on run
create admin pass and secret key by itself on run
* Update README.md
* Update CONTRIBUTING.md
* create admin pass and secret key by itself on run
* better docs
* fix pwd truncation
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+16-2Lines changed: 16 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,21 @@
34
34
35
35
## Style Guide
36
36
37
-
Keeping to a consistent code style throughout the project makes it easier to contribute and collaborate. Please stick to the guidelines in PEP8, [](https://github.com/psf/black) and the Google Style Guide unless there’s a very good reason not to.
37
+
Keeping to a consistent code style throughout the project makes it easier to contribute and collaborate. Please stick to the guidelines in [](https://github.com/psf/black) and the Google Style Guide unless there’s a very good reason not to.
38
+
39
+
### Before submitting a Pull Request, please run these 2 commands locally
* 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).
2. Create `virtual environment` to deal with dependencies and requirements.
18
+
19
+
```bash
20
+
$ virtualenv -p /usr/bin/python3 venv
21
+
$ source venv/bin/activate
22
+
$ cd src/
23
+
```
24
+
25
+
3. With `virtual environment` activated, install requirements, init db and run !
26
+
27
+
```bash
28
+
[venv]$ pip install -r requirements.txt
29
+
[venv]$ python create_db.py # Only required on first run
30
+
[venv]$ python run.py
31
+
```
32
+
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.
34
+
35
+
### Docker
36
+
37
+
> Note: The Docker support is not tested for production yet. It's recommended to use Heroku for production.
* 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).
2. Create `virtual environment` to deal with dependencies and requirements.
96
-
97
-
```bash
98
-
$ virtualenv -p /usr/bin/python3 venv
99
-
$ source venv/bin/activate
100
-
$ cd src/
101
-
```
102
-
103
-
3. With `virtual environment` activated, install requirements, init db and run !
104
-
105
-
```bash
106
-
[venv]$ pip install -r requirements.txt
107
-
[venv]$ python create_db.py # Only required on first run
108
-
[venv]$ python run.py
109
-
```
110
65
111
-
### Configuration For Your CTF
66
+
2. Configure your CTF settings (such as name, running time) in [`config.py`](https://github.com/abs0lut3pwn4g3/RTB-CTF-Framework/blob/master/src/FlaskRTBCTF/config.py).
112
67
113
-
Using this as simple as anything.
68
+
3. In the `app.json`, change the `repository` key's value to match your fork's URL.
114
69
115
-
1. Just configure your CTF settings in [`config.py`](https://github.com/abs0lut3pwn4g3/RTB-CTF-Framework/blob/master/src/FlaskRTBCTF/config.py).
70
+
4. Push these changes to the remote of your fork.
116
71
117
-
2. When you run [`create_db.py`](https://github.com/abs0lut3pwn4g3/RTB-CTF-Framework/blob/master/src/create_db.py), a strong and random 16 char password for the **admin** user is created and set in the environment variable `ADMIN_PASS`. On Heroku, you can reveal this password from your application's dashboard settings.
72
+
5. Visit your Fork's GitHub URL in the browser and click on the following **Deploy to Heroku** button.
73
+
74
+
> Note: A psuedo-random password for the **admin** user would be created and set in the config variable `ADMIN_PASS`. On Heroku, you can reveal this password from your application's dashboard settings. Same for the Flask application's `SECRET_KEY`.
118
75
119
-
3. See database instance creation steps under How To Use.
Bonus: You can manage the database CRUD operations from admin views GUI as well as issue notifications.
78
+
#### Yay! Now you have a customized instance of the RTB-CTF-Framework live on Heroku. 🎉
122
79
123
-
> 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.
80
+
> Bonus: You can manage the database CRUD operations from admin views GUI; change machine settings, issue notifications to users, etc.
124
81
125
82
## Contributing
126
83
@@ -133,7 +90,6 @@ Bonus: You can manage the database CRUD operations from admin views GUI as well
0 commit comments