Gros refactoring
This commit is contained in:
parent
4a6bfc951f
commit
dd22432b48
12 changed files with 18 additions and 18 deletions
|
@ -17,7 +17,7 @@ CONTAINER_NAME="fabriquedoc-frontend"
|
|||
IMAGE_NAME="local/fabriquedoc-frontend"
|
||||
PORT="8051"
|
||||
ENV_FILE=".env"
|
||||
BACKEND_ENDPOINT="http://fabriquedoc:8000"
|
||||
BACKEND_ENDPOINT="http://fabriquedoc:8080"
|
||||
|
||||
# Créer le réseau Docker s'il n'existe pas déjà
|
||||
if ! docker network inspect "$NETWORK_NAME" >/dev/null 2>&1; then
|
||||
|
|
|
@ -32,7 +32,7 @@ def init_session_state():
|
|||
if 'fabriquedoc_endpoint' not in st.session_state:
|
||||
load_dotenv() # Charge les variables d'environnement depuis un fichier .env
|
||||
# Définit l'URL du backend, avec une valeur par défaut si non spécifiée
|
||||
st.session_state['fabriquedoc_endpoint'] = os.environ.get("FABRIQUEDOC_ENDPOINT", "http://127.0.0.1:8000")
|
||||
st.session_state['fabriquedoc_endpoint'] = os.environ.get("FABRIQUEDOC_ENDPOINT", "http://127.0.0.1:8080")
|
||||
|
||||
# Initialise d'autres variables de session avec des valeurs par défaut
|
||||
for key, default_value in [('options', ""), ('bearer_token', ""), ('logged_in', False)]:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Ce script fonctionne sur Windows
|
||||
|
||||
# Définir l'adresse du backend
|
||||
$env:FABRIQUEDOC_ENDPOINT = "http://localhost:8000"
|
||||
$env:FABRIQUEDOC_ENDPOINT = "http://localhost:8080"
|
||||
|
||||
# Vérifier si Streamlit est installé
|
||||
if (!(Get-Command streamlit -ErrorAction SilentlyContinue)) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# Ce script fonctionne sur macOS et Linux
|
||||
|
||||
# Définir l'adresse du backend
|
||||
export FABRIQUEDOC_ENDPOINT="http://localhost:8000"
|
||||
export FABRIQUEDOC_ENDPOINT="http://localhost:8080"
|
||||
|
||||
# Vérifier si Streamlit est installé
|
||||
if ! command -v streamlit &> /dev/null; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue