Skip to content

Commit 59d0796

Browse files
committed
docker-compose fixes | redirection bug fixed | admin views modified
1 parent cf975e7 commit 59d0796

File tree

5 files changed

+1185
-2
lines changed

5 files changed

+1185
-2
lines changed

docker-compose-for-tests.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
version: "3"
2+
3+
services:
4+
rtbctf:
5+
build: .
6+
container_name: rtb_gunicorn
7+
restart: unless-stopped
8+
expose:
9+
- "8000"
10+
environment:
11+
- DEBUG=False
12+
- SECRET_KEY=changeme
13+
- DB_USER=eshaan
14+
- DB_PASSWORD=eshaan
15+
- DB_NAME=rtbctf
16+
- DB_PORT=5432
17+
- WORKERS=8
18+
- ADMIN_PASS=admin
19+
depends_on:
20+
- postgres
21+
- redis
22+
23+
postgres:
24+
image: library/postgres:12.1-alpine
25+
container_name: rtb_postgres
26+
restart: unless-stopped
27+
expose:
28+
- "5432"
29+
environment:
30+
- POSTGRES_USER=eshaan
31+
- POSTGRES_PASSWORD=eshaan
32+
- POSTGRES_DB=rtbctf
33+
34+
redis:
35+
image: redis:6.0-rc4-alpine
36+
container_name: rtb_redis
37+
restart: unless-stopped
38+
expose:
39+
- "6379"
40+
41+
42+
nginx:
43+
image: library/nginx:1.16.1-alpine
44+
container_name: rtb_nginx
45+
restart: unless-stopped
46+
hostname: nginx
47+
volumes:
48+
- ./rtb_nginx_http:/etc/nginx/conf.d/default.conf
49+
ports:
50+
- "80:80"
51+
- "443:443"
52+
depends_on:
53+
- rtbctf

docker-compose.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ version: "3"
22

33
services:
44
rtbctf:
5-
build: .
6-
container_name: rtb_gunicorn
5+
image: eshaan7/rtb-ctf-framework
76
restart: unless-stopped
87
expose:
98
- "8000"

src/FlaskRTBCTF/admin/views.py

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ def after_model_delete(model):
5555

5656
class MachineAdminView(BaseModelView):
5757
can_view_details = True
58+
column_exclude_list = ("user_hash", "root_hash", "updated_on")
5859
column_searchable_list = ("name", "ip")
5960

6061
@expose("/new/")
@@ -69,6 +70,7 @@ def edit_view(self):
6970

7071
class ChallengeAdminView(BaseModelView):
7172
can_view_details = True
73+
column_exclude_list = ("description", "flag", "url")
7274
column_searchable_list = ("title", "url")
7375
form_choices = {
7476
"difficulty": [

src/create_db.py

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def populate_tags():
1818
db.session.add(Tag(label="osint", color="#CB7303"))
1919
db.session.add(Tag(label="binary", color="#AE1438"))
2020
db.session.add(Tag(label="forensics", color="#2B2B52"))
21+
db.session.add(Tag(label="programming", color="#2B2B52"))
2122

2223

2324
def populate_categories():
@@ -28,6 +29,8 @@ def populate_categories():
2829
"steganography",
2930
"cryptography",
3031
"OSINT",
32+
"scripting",
33+
"networking",
3134
"misc",
3235
]
3336
for name in category_names:

0 commit comments

Comments
 (0)