Compare commits

..

No commits in common. "38177fa2594e273d748d2cf3c6aa45a27cc4e23e" and "5bb8f17679e83290bf8591c56beec7a7c1d71a58" have entirely different histories.

2 changed files with 2 additions and 21 deletions

View File

@ -9,19 +9,9 @@ Only the clients need a connection to this service on configured port.
[[_TOC_]] [[_TOC_]]
# Setup (Service) # Setup (Service)
**System requirements**:
- 256mb ram
- 4gb hdd
Tested with Ubuntu 22.10 (from Proxmox templates), actually its consuming 100mb ram and 750mb hdd.
**Prepare your system**:
- Make sure your timezone is set correct on you fastapi-dls server and your client
## Docker ## Docker
Docker-Images are available here: Docker-Images are available here:

View File

@ -22,10 +22,9 @@ from sqlalchemy.orm import sessionmaker
from util import load_key, load_file from util import load_key, load_file
from orm import Origin, Lease, init as db_init, migrate from orm import Origin, Lease, init as db_init, migrate
logger = logging.getLogger()
load_dotenv('../version.env') load_dotenv('../version.env')
TZ = datetime.now().astimezone().tzinfo
VERSION, COMMIT, DEBUG = env('VERSION', 'unknown'), env('COMMIT', 'unknown'), bool(env('DEBUG', False)) VERSION, COMMIT, DEBUG = env('VERSION', 'unknown'), env('COMMIT', 'unknown'), bool(env('DEBUG', False))
config = dict(openapi_url='/-/openapi.json', docs_url='/-/docs', redoc_url='/-/redoc') config = dict(openapi_url='/-/openapi.json', docs_url='/-/docs', redoc_url='/-/redoc')
@ -59,8 +58,6 @@ app.add_middleware(
allow_headers=['*'], allow_headers=['*'],
) )
logging.basicConfig()
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG if DEBUG else logging.INFO) logger.setLevel(logging.DEBUG if DEBUG else logging.INFO)
@ -100,7 +97,6 @@ async def _config():
'LEASE_EXPIRE_DELTA': str(LEASE_EXPIRE_DELTA), 'LEASE_EXPIRE_DELTA': str(LEASE_EXPIRE_DELTA),
'LEASE_RENEWAL_PERIOD': str(LEASE_RENEWAL_PERIOD), 'LEASE_RENEWAL_PERIOD': str(LEASE_RENEWAL_PERIOD),
'CORS_ORIGINS': str(CORS_ORIGINS), 'CORS_ORIGINS': str(CORS_ORIGINS),
'TZ': str(TZ),
}) })
@ -533,11 +529,6 @@ async def leasing_v1_lessor_shutdown(request: Request):
return JSONr(response) return JSONr(response)
@app.on_event('startup')
async def app_on_startup():
logger.info(f'Using timezone: {str(TZ)}. Make sure this is correct and match your clients!')
if __name__ == '__main__': if __name__ == '__main__':
import uvicorn import uvicorn