assemble docker image with frontend and api
All checks were successful
Build Container / Build Container (push) Successful in 1m30s

This commit is contained in:
lilly 2026-05-14 20:32:59 +02:00
commit cb570a7663
Signed by: lilly
SSH key fingerprint: SHA256:y9T5GFw2A20WVklhetIxG1+kcg/Ce0shnQmbu1LQ37g
2 changed files with 17 additions and 13 deletions

View file

@ -40,12 +40,22 @@ def main():
default=os.environ.get("DOORIS_BASE_URL", None),
help="The Base-URL that this application is reachable under",
)
argp.add_argument(
"--serve-static",
required=False,
default=os.environ.get("DOORIS_SERVE_STATIC", None),
help="In addition to the API functionality, serve static files from this path",
)
args = argp.parse_args()
app_config.set(args)
import uvicorn
from dooris_api.app import app
if args.serve_static:
from fastapi.staticfiles import StaticFiles
app.mount("/", StaticFiles(directory=args.serve_static, html=True), name="static")
config = uvicorn.Config(app, port=8000, log_level="debug")
server = uvicorn.Server(config)
server.run()