-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
performance boost with meinheld and flask-minify, fixes, admin can no…
…w change user password (#76)
- Loading branch information
Showing
29 changed files
with
168 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
##### RTB-CTF-Framework environment variables configuration ##### | ||
|
||
# Generate a psuedo-random secret with: .. | ||
#... python3 -c "print(__import__('secrets').token_hex(16))" | ||
SECRET_KEY=DontForgetToChangeMe | ||
# If serving over HTTPS, mark this True for added security | ||
SSL_ENABLED=False | ||
# about 2 x number of CPU cores | ||
WORKERS=4 | ||
# Choose a strong password for administrator! | ||
ADMIN_PASS=admin | ||
# These values should be the same as specified in .env_postgres | ||
DB_USER=user | ||
DB_PASSWORD=password | ||
DB_NAME=rtbctf | ||
# Don't change | ||
DB_PORT=5432 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Please choose a strong password !! | ||
|
||
POSTGRES_USER=user | ||
POSTGRES_PASSWORD=password | ||
POSTGRES_DB=rtbctf |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
__pycache__/ | ||
venv/ | ||
migrations/ | ||
*.pyc | ||
.vscode/ | ||
*.db | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
FROM python:3.8.2-alpine3.11 | ||
FROM python:3.8.3-alpine3.12 | ||
|
||
MAINTAINER [email protected] | ||
LABEL maintainer="[email protected]" | ||
|
||
# Env | ||
RUN export DATABASE_URL="postgres://${DB_USER}:${DB_PASSWORD}@postgres:${DB_PORT}/${DB_NAME}" \ | ||
|
@@ -16,8 +16,8 @@ RUN adduser --shell /sbin/login www-data -DH | |
# Install RTB-CTF-Framework | ||
WORKDIR /usr/src/app | ||
COPY src ./ | ||
RUN pip install --no-cache-dir -r requirements.txt \ | ||
&& chown -R www-data ./ | ||
RUN chown -R www-data ./ | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
USER www-data | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,6 @@ | |
} | ||
}, | ||
"scripts": { | ||
"postdeploy": "python3 src/create_db.py" | ||
"postdeploy": "bash src/init_db.sh" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.