-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from blink-zero/v1.0.1beta-release
Update Dependencies and Codebase for Compatibility with Latest Libraries
- Loading branch information
Showing
13 changed files
with
178 additions
and
128 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import json | ||
from datetime import datetime | ||
import logging | ||
from flask import session | ||
|
||
# Custom JSON encoder for logging | ||
class CustomJSONEncoder(json.JSONEncoder): | ||
def default(self, obj): | ||
if isinstance(obj, bytes): | ||
return obj.decode('utf-8') | ||
return super().default(obj) | ||
|
||
# Custom JSON log formatter | ||
class JSONFormatter(logging.Formatter): | ||
def format(self, record): | ||
log_record = { | ||
"timestamp": datetime.now().strftime('%Y-%m-%d %H:%M:%S'), | ||
"level": record.levelname, | ||
"message": record.msg, | ||
"user": getattr(record, 'user', 'anonymous'), | ||
**getattr(record, 'extra', {}) | ||
} | ||
return json.dumps(log_record, cls=CustomJSONEncoder) | ||
|
||
def log_json(level, message, **kwargs): | ||
json_logger = logging.getLogger('json_logger') | ||
extra_info = {"extra": kwargs, "user": session.get('username', 'anonymous')} | ||
json_logger.log(getattr(logging, level), message, extra=extra_info) |
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,29 @@ | ||
version: '3' | ||
services: | ||
app: | ||
container_name: deployaroo-app | ||
restart: always | ||
build: . | ||
ports: | ||
- "8000:8000" | ||
environment: | ||
SECRET_KEY: 'your_secret_key' # Change this | ||
ENCRYPTION_KEY: 'your_encryption_key' # Change this | ||
APP_ADMIN_USER: 'administrator' # Change this | ||
APP_ADMIN_PASSWORD: 'password' # Change this | ||
# Volumes are optional | ||
volumes: | ||
- ./deployaroo-data/logs:/home/project/app/logs | ||
- ./deployaroo-data/backups:/home/project/app/apps/backups | ||
command: gunicorn -w 10 -b :8000 run:app --timeout 3600 | ||
|
||
nginx: | ||
container_name: deployaroo-nginx | ||
restart: always | ||
image: "nginx:latest" | ||
ports: | ||
- "80:80" | ||
volumes: | ||
- ./nginx:/etc/nginx/conf.d | ||
depends_on: | ||
- app |
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,15 +1,15 @@ | ||
flask==2.1.3 | ||
flask_login==0.5.0 | ||
flask==3.0.3 | ||
flask_login==0.6.3 | ||
flask-sslify==0.1.5 | ||
gunicorn==20.1.0 | ||
flask_migrate==3.1.0 | ||
flask_sqlalchemy==2.5.1 | ||
sqlalchemy==1.4.29 | ||
Werkzeug==2.0.3 | ||
gunicorn==22.0.0 | ||
flask_migrate==4.0.7 | ||
flask_sqlalchemy==3.1.1 | ||
sqlalchemy==2.0.16 | ||
Werkzeug==3.0.3 | ||
requests>=2.27.1 | ||
pyvmomi==8.0.0.1.2 | ||
ansible_runner==2.3.2 | ||
markdown==3.4.3 | ||
flask-paginate==2022.1.8 | ||
flask-paginate==2024.4.12 | ||
retrying==1.3.4 | ||
pywinrm==0.4.3 | ||
pywinrm==0.4.3 |
Oops, something went wrong.