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
custom_domain=yourdomain.com | |
certbot_email=user@yourdomain.com | |
sudo apt -qqy update | |
sudo apt -qqy install nginx | |
sudo apt -qqy install certbot python3-certbot-nginx ufw | |
sudo systemctl enable nginx | |
sudo systemctl start nginx | |
ufw allow ssh && ufw allow http && ufw allow https && ufw allow 8000 && ufw --force enable |
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
import logging | |
import os | |
import sys | |
import time | |
from app import settings | |
def setup_logging(): | |
""" |
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
def to_schema_type(t): | |
''' | |
Convert SQL Alchemy data types to Open API compatible strings | |
''' | |
if t in [sqlt.TEXT, sqlt.VARCHAR, sqlt.CHAR, sqlt.Enum, sqlt.DateTime, sqlt.Date]: | |
return 'string' | |
if t in [sqlt.INT, sqlt.INTEGER, sqlt.BIGINT]: | |
return 'integer' | |
if t in [sqlt.BOOLEAN]: | |
return 'boolean' |