Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.dist.compose
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ MONGO_EXPRESS_PASSWORD=
ODTP_PATH=
MINIO_PATH=
MONGODB_PATH=

# Dashboard parameters
ODTP_DASHBOARD_PORT=
ODTP_DASHBOARD_RELOAD=
4 changes: 4 additions & 0 deletions .env.dist.local
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ ODTP_SECRET_KEY=

# your github token
GITHUB_TOKEN=

# Dashboard parameters
ODTP_DASHBOARD_PORT=
ODTP_DASHBOARD_RELOAD=
5 changes: 4 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
image: odtp
privileged: true
ports:
- "8000:8000"
- ${ODTP_DASHBOARD_PORT}:${ODTP_DASHBOARD_PORT}
- "8501:8501"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Expand All @@ -19,6 +19,9 @@ services:
ODTP_SECRET_KEY: ${ODTP_SECRET_KEY}
GITHUB_TOKEN: ${GITHUB_TOKEN}
ODTP_MONGO_DB: ${ODTP_MONGO_DB}
ODTP_DASHBOARD_PORT: ${ODTP_DASHBOARD_PORT}
ODTP_DASHBOARD_RELOAD: ${ODTP_DASHBOARD_RELOAD}

stdin_open: true
tty: true
depends_on:
Expand Down
8 changes: 7 additions & 1 deletion odtp/dashboard/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from nicegui import app, native, ui
from odtp.helpers.settings import (ODTP_DASHBOARD_PORT, ODTP_DASHBOARD_RELOAD)

import odtp.dashboard.utils.ui_theme as ui_theme
from odtp.dashboard.pages.page_about import content as about_page
Expand Down Expand Up @@ -47,4 +48,9 @@ def components():

app.add_static_files("/static", "static")

ui.run(title="ODTP", storage_secret="private key to secure the browser session cookie")
ui.run(
title="ODTP",
storage_secret="private key to secure the browser session cookie",
port=ODTP_DASHBOARD_PORT,
reload=ODTP_DASHBOARD_RELOAD
)
2 changes: 2 additions & 0 deletions odtp/helpers/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
ODTP_BUCKET_NAME = os.getenv("ODTP_BUCKET_NAME")
ODTP_ACCESS_KEY = os.getenv("ODTP_ACCESS_KEY")
ODTP_SECRET_KEY = os.getenv("ODTP_SECRET_KEY")
ODTP_DASHBOARD_PORT = int(os.getenv("ODTP_DASHBOARD_PORT"))
ODTP_DASHBOARD_RELOAD = bool(os.getenv("ODTP_DASHBOARD_RELOAD"))