From ad8772d112516b5ae257b11942f1fd5eddc5e940 Mon Sep 17 00:00:00 2001 From: Katarina Date: Tue, 15 Jul 2025 20:57:21 +0200 Subject: [PATCH] Amend env var stubs --- docker/entrypoint.sh | 4 +--- src/main.ts | 9 +++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 64c0b8e..88fa17b 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -13,9 +13,7 @@ EOF # Generate nginx config from template (if using) if [ -f "/etc/nginx/templates/nginx.conf.template" ]; then - envsubst '${API_HOST} ${API_PORT}' \ - < /etc/nginx/templates/nginx.conf.template \ - > /etc/nginx/nginx.conf + envsubst '${API_HOST} ${API_PORT}' < /etc/nginx/templates/nginx.conf.template > /etc/nginx/nginx.conf fi # Start Nginx diff --git a/src/main.ts b/src/main.ts index 020d7c6..d9ac92c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -139,12 +139,12 @@ router.beforeEach(async (to) => { app.use(router); app.use(ToastService) -let apiUrl = getApiUrl(); +let apiUrl: string | undefined -if (!apiUrl) { - apiUrl = `http://${apiUrl}` +if (!getApiUrl()) { + apiUrl = `http://${getApiUrl()}` } else { - apiUrl = '' + apiUrl = "http://localhost:7070" } const axiosInstance = axios.create({ @@ -173,6 +173,7 @@ axiosInstance.interceptors.response.use( } ) +console.log(apiUrl) const deckService: DeckService = new DeckService(undefined, undefined, axiosInstance) const cardService: CardService = new CardService(undefined, undefined, axiosInstance) const setService: SetService = new SetService(undefined, undefined, axiosInstance)