-
Notifications
You must be signed in to change notification settings - Fork 1
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 #95 from DNO-inc/bodya
burrito-cluster & version 0.6.0
- Loading branch information
Showing
28 changed files
with
636 additions
and
205 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,6 @@ rmi: | |
|
||
db_conn: | ||
scripts/connect_to_db.sh | ||
|
||
check_burrito_cluster: | ||
$(PYTHON) scripts/check_burrito_cluster.py |
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 +1 @@ | ||
__version__ = "0.5.7 indev" | ||
__version__ = "0.6.0 indev" |
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 |
---|---|---|
@@ -1,4 +1,36 @@ | ||
import uvicorn | ||
from random import randint | ||
from fastapi.routing import APIRoute | ||
|
||
from burrito.utils.config_reader import get_config | ||
from burrito.containers import prepare_app | ||
from burrito.utils.app_util import get_current_app, connect_app | ||
|
||
|
||
if prepare_app(): | ||
from burrito.apps.about.router import about_router | ||
else: | ||
print("App preparation failed") | ||
|
||
|
||
app = get_current_app(docs_url="/about/docs", openapi_url="/about/openapi.json") | ||
connect_app(app, "/about", about_router) | ||
|
||
|
||
# TODO: temporary function, should be deleted in soon | ||
def use_route_names_as_operation_ids(app) -> None: | ||
for route in app.routes: | ||
if isinstance(route, APIRoute): | ||
route.operation_id = route.name + str(randint(0, 1000)) # TODO: delete this fuc | ||
|
||
|
||
use_route_names_as_operation_ids(app) | ||
|
||
|
||
prepare_app() | ||
if __name__ == "__main__": | ||
uvicorn.run( | ||
"burrito.apps.about.__main__:app", | ||
host="0.0.0.0", | ||
port=int(get_config().BURRITO_PORT_ABOUT), | ||
proxy_headers=bool(get_config().BURRITO_PROXY_HEADERS) | ||
) |
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 |
---|---|---|
@@ -1,4 +1,36 @@ | ||
import uvicorn | ||
from random import randint | ||
from fastapi.routing import APIRoute | ||
|
||
from burrito.utils.config_reader import get_config | ||
from burrito.containers import prepare_app | ||
from burrito.utils.app_util import get_current_app, connect_app | ||
|
||
|
||
if prepare_app(): | ||
from burrito.apps.admin.router import admin_router | ||
else: | ||
print("App preparation failed") | ||
|
||
|
||
app = get_current_app(docs_url="/admin/docs", openapi_url="/admin/openapi.json") | ||
connect_app(app, "/admin", admin_router) | ||
|
||
|
||
# TODO: temporary function, should be deleted in soon | ||
def use_route_names_as_operation_ids(app) -> None: | ||
for route in app.routes: | ||
if isinstance(route, APIRoute): | ||
route.operation_id = route.name + str(randint(0, 1000)) # TODO: delete this fuc | ||
|
||
|
||
use_route_names_as_operation_ids(app) | ||
|
||
|
||
prepare_app() | ||
if __name__ == "__main__": | ||
uvicorn.run( | ||
"burrito.apps.admin.__main__:app", | ||
host="0.0.0.0", | ||
port=int(get_config().BURRITO_PORT_ADMIN), | ||
proxy_headers=bool(get_config().BURRITO_PROXY_HEADERS) | ||
) |
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 |
---|---|---|
@@ -1,4 +1,36 @@ | ||
import uvicorn | ||
from random import randint | ||
from fastapi.routing import APIRoute | ||
|
||
from burrito.utils.config_reader import get_config | ||
from burrito.containers import prepare_app | ||
from burrito.utils.app_util import get_current_app, connect_app | ||
|
||
|
||
if prepare_app(): | ||
from burrito.apps.anon.router import anon_router | ||
else: | ||
print("App preparation failed") | ||
|
||
|
||
app = get_current_app(docs_url="/anon/docs", openapi_url="/anon/openapi.json") | ||
connect_app(app, "/anon", anon_router) | ||
|
||
|
||
# TODO: temporary function, should be deleted in soon | ||
def use_route_names_as_operation_ids(app) -> None: | ||
for route in app.routes: | ||
if isinstance(route, APIRoute): | ||
route.operation_id = route.name + str(randint(0, 1000)) # TODO: delete this fuc | ||
|
||
|
||
use_route_names_as_operation_ids(app) | ||
|
||
|
||
prepare_app() | ||
if __name__ == "__main__": | ||
uvicorn.run( | ||
"burrito.apps.anon.__main__:app", | ||
host="0.0.0.0", | ||
port=int(get_config().BURRITO_PORT_ANON), | ||
proxy_headers=bool(get_config().BURRITO_PROXY_HEADERS) | ||
) |
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 |
---|---|---|
@@ -1,4 +1,36 @@ | ||
import uvicorn | ||
from random import randint | ||
from fastapi.routing import APIRoute | ||
|
||
from burrito.utils.config_reader import get_config | ||
from burrito.containers import prepare_app | ||
from burrito.utils.app_util import get_current_app, connect_app | ||
|
||
|
||
if prepare_app(): | ||
from burrito.apps.auth.router import auth_router | ||
else: | ||
print("App preparation failed") | ||
|
||
|
||
app = get_current_app(docs_url="/auth/docs", openapi_url="/auth/openapi.json") | ||
connect_app(app, "/auth", auth_router) | ||
|
||
|
||
# TODO: temporary function, should be deleted in soon | ||
def use_route_names_as_operation_ids(app) -> None: | ||
for route in app.routes: | ||
if isinstance(route, APIRoute): | ||
route.operation_id = route.name + str(randint(0, 1000)) # TODO: delete this fuc | ||
|
||
|
||
use_route_names_as_operation_ids(app) | ||
|
||
|
||
prepare_app() | ||
if __name__ == "__main__": | ||
uvicorn.run( | ||
"burrito.apps.auth.__main__:app", | ||
host="0.0.0.0", | ||
port=int(get_config().BURRITO_PORT_AUTH), | ||
proxy_headers=bool(get_config().BURRITO_PROXY_HEADERS) | ||
) |
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 |
---|---|---|
@@ -1,4 +1,36 @@ | ||
import uvicorn | ||
from random import randint | ||
from fastapi.routing import APIRoute | ||
|
||
from burrito.utils.config_reader import get_config | ||
from burrito.containers import prepare_app | ||
from burrito.utils.app_util import get_current_app, connect_app | ||
|
||
|
||
if prepare_app(): | ||
from burrito.apps.comments.router import comments_router | ||
else: | ||
print("App preparation failed") | ||
|
||
|
||
app = get_current_app(docs_url="/comments/docs", openapi_url="/comments/openapi.json") | ||
connect_app(app, "/comments", comments_router) | ||
|
||
|
||
# TODO: temporary function, should be deleted in soon | ||
def use_route_names_as_operation_ids(app) -> None: | ||
for route in app.routes: | ||
if isinstance(route, APIRoute): | ||
route.operation_id = route.name + str(randint(0, 1000)) # TODO: delete this fuc | ||
|
||
|
||
use_route_names_as_operation_ids(app) | ||
|
||
|
||
prepare_app() | ||
if __name__ == "__main__": | ||
uvicorn.run( | ||
"burrito.apps.comments.__main__:app", | ||
host="0.0.0.0", | ||
port=int(get_config().BURRITO_PORT_COMMENTS), | ||
proxy_headers=bool(get_config().BURRITO_PROXY_HEADERS) | ||
) |
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 |
---|---|---|
@@ -1,4 +1,36 @@ | ||
import uvicorn | ||
from random import randint | ||
from fastapi.routing import APIRoute | ||
|
||
from burrito.utils.config_reader import get_config | ||
from burrito.containers import prepare_app | ||
from burrito.utils.app_util import get_current_app, connect_app | ||
|
||
|
||
if prepare_app(): | ||
from burrito.apps.iofiles.router import iofiles_router | ||
else: | ||
print("App preparation failed") | ||
|
||
|
||
app = get_current_app(docs_url="/iofiles/docs", openapi_url="/iofiles/openapi.json") | ||
connect_app(app, "/iofiles", iofiles_router) | ||
|
||
|
||
# TODO: temporary function, should be deleted in soon | ||
def use_route_names_as_operation_ids(app) -> None: | ||
for route in app.routes: | ||
if isinstance(route, APIRoute): | ||
route.operation_id = route.name + str(randint(0, 1000)) # TODO: delete this fuc | ||
|
||
|
||
use_route_names_as_operation_ids(app) | ||
|
||
|
||
prepare_app() | ||
if __name__ == "__main__": | ||
uvicorn.run( | ||
"burrito.apps.iofiles.__main__:app", | ||
host="0.0.0.0", | ||
port=int(get_config().BURRITO_PORT_IOFILES), | ||
proxy_headers=bool(get_config().BURRITO_PROXY_HEADERS) | ||
) |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.