Skip to content

Commit

Permalink
update setup.cfg, update main.py, update docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
MBueschelberger committed Sep 7, 2023
1 parent 1708009 commit f925708
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docker-compose.marketplace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
REAXPRO_MINIO_PASSWORD: ${REAXPRO_MINIO_PASSWORD}
REAXPRO_FASTAPI_HOST: ${REAXPRO_FASTAPI_HOST:-'0.0.0.0'}
REAXPRO_FASTAPI_PORT: ${REAXPRO_FASTAPI_PORT:-8080}
REAXPRO_AUTHENTICATION_DEPENDENCIES: True
REAXPRO_AUTHENTICATION_DEPENDENCIES: ${AUTHENTICATION_DEPENDENCIES:-True}
PYTHON_BIN: ${PYTHON_BIN:-python3}
KEYCLOAK_HOST: ${KEYCLOAK_HOST}
KEYCLOAK_CLIENT_ID: ${KEYCLOAK_CLIENT_ID}
Expand Down
8 changes: 8 additions & 0 deletions osp/app/main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
"""Main FastAPI-middleware for running remote celery tasks"""
import logging
import os
from datetime import datetime
from typing import Annotated, Any, Dict, List, Optional, Union
from uuid import UUID

import pkg_resources
import uvicorn
from celery import Celery
from fastapi import Body, Depends, FastAPI, HTTPException, Query, Response
from fastapi.openapi.utils import get_openapi
Expand Down Expand Up @@ -360,3 +362,9 @@ async def on_shutdown() -> None:
"""Define functions for app during shutdown"""
await redis_plugin.terminate()
await config_plugin.terminate()


if __name__ == "__main__":
host = os.environ["REAXPRO_FASTAPI_HOST"]
port = int(os.environ["REAXPRO_FASTAPI_PORT"])
uvicorn.run(app, host=host, port=port, log_level="debug")
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = A package running semantically enriched workflows with SimPhoNy an
long_description = file: README.md
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
License :: OSI Approved :: BSD 3-Clause
Operating System :: OS Independent

[options]
Expand Down

0 comments on commit f925708

Please sign in to comment.