diff --git a/documentation/deployment_instructions.md b/documentation/deployment_instructions.md index ddcdbdc..57f2058 100644 --- a/documentation/deployment_instructions.md +++ b/documentation/deployment_instructions.md @@ -35,7 +35,8 @@ The full list of settings is as follows: | `POSTGRES_PASSWORD` | The password for Postgres access. This should be set to `'postgres'`. | | `POSTGRES_PORT` | The port through which the Postgres is exposed. This should be set to `5432`. | | `API_BASE_URL` | The URL and port by which the QCrBox tool manager can be accessed. If QCrBox is installed on the same machine as this setup, this should be set to `'http://host.docker.internal:11000'`. | - | `API_VISUALISER_PORT` | The port through which the QCrBox_quality visualiser can be accessed. This should be set to `12008` in most cases. | + | `TRAEFIK_HTTP_PORT` | The port through which the Traefik router (which handles GUI routing) is exposed. For development, this should be set to `12345`. | + | `GUI_DOMAIN_PREFIX` | The prefix for GUI subdomains. This should be set to `.gui.` for default setups. | | `MAX_LENGTH_API_LOG` | The maximum length of API output to be saved in the logs. As some API outputs can be quite long, this gives the option to truncate them in the logs, making the logs more unwieldy at the cost of losing some debug information. | | `DJANGO_SUPERUSER_EMAIL` | The email address for the default admin account to be created for the web app. | | `DJANGO_SUPERUSER_USERNAME` | The username for the default admin account to be created for the web app. | diff --git a/environment.env.template b/environment.env.template index 92bd476..6e31918 100644 --- a/environment.env.template +++ b/environment.env.template @@ -8,7 +8,8 @@ POSTGRES_PASSWORD='postgres' POSTGRES_PORT=5432 API_BASE_URL='http://host.docker.internal:11000' -API_VISUALISER_PORT='12008' +TRAEFIK_HTTP_PORT='12345' +GUI_DOMAIN_PREFIX='.gui.' MAX_LENGTH_API_LOG=10000 diff --git a/qcrbox_frontend/core/settings.py b/qcrbox_frontend/core/settings.py index f8692ec..c8977d6 100644 --- a/qcrbox_frontend/core/settings.py +++ b/qcrbox_frontend/core/settings.py @@ -211,7 +211,10 @@ # API settings API_BASE_URL = os.environ.get('API_BASE_URL', 'http://127.0.0.1:11000') -API_VISUALISER_PORT = os.environ.get('API_VISUALISER_PORT', '12008') + +# Traefik / GUI Routing settings +TRAEFIK_HTTP_PORT = int(os.environ.get('TRAEFIK_HTTP_PORT', '12345') or 12345) +GUI_DOMAIN_PREFIX = os.environ.get('GUI_DOMAIN_PREFIX', '.gui.') # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.2/howto/static-files/ diff --git a/qcrbox_frontend/qcrbox/templates/workflow.html b/qcrbox_frontend/qcrbox/templates/workflow.html index c1e37fd..ef14233 100644 --- a/qcrbox_frontend/qcrbox/templates/workflow.html +++ b/qcrbox_frontend/qcrbox/templates/workflow.html @@ -168,8 +168,14 @@
Calculation in progress, do not close this tab!
{% if current_command.interactive %} {% elif calculation_in_progress %}