diff --git a/.env b/.env
index 940f00c6..5dca655e 100644
--- a/.env
+++ b/.env
@@ -1 +1 @@
-VITE_BASE_URL=http://localhost:5032
\ No newline at end of file
+VITE_API_URL=http://localhost:5032
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 34c33b4f..34f8fe31 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,5 +21,9 @@ RUN npm run build # This will run tsc -b and vite build
# Expose the port the app will use
EXPOSE 4173
+# Copy the entrypoint script
+COPY entrypoint.sh /entrypoint.sh
+RUN chmod +x /entrypoint.sh
+
# Start the app using the preview server
CMD ["npm", "run", "preview"]
diff --git a/assets/js/config.js b/assets/js/config.js
new file mode 100644
index 00000000..e69de29b
diff --git a/assets/vendor/js/helpers.js b/assets/vendor/js/helpers.js
new file mode 100644
index 00000000..e69de29b
diff --git a/docker-compose.yml b/docker-compose.yml
index ae089be5..cf309b6c 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -17,7 +17,7 @@ services:
networks:
- marco_network
environment:
- - VITE_BASE_URL=http://server:8080 # Use the service name `server`
+ - VITE_API_URL=http://server:8080 # Use the service name `server`
ports:
- "4173:4173"
diff --git a/entrypoint.sh b/entrypoint.sh
new file mode 100644
index 00000000..cc29e5c3
--- /dev/null
+++ b/entrypoint.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Create a JavaScript file with environment variables
+echo "window._env_ = { VITE_API_URL: \"$VITE_API_URL\" };" > /app/dist/env.js
+
+# Start the Vite preview server
+exec "$@"
diff --git a/env.js b/env.js
new file mode 100644
index 00000000..c7ec755e
--- /dev/null
+++ b/env.js
@@ -0,0 +1 @@
+windows._env._ = { VITE_API_URL: "http://localhost:4200" };
diff --git a/index.html b/index.html
index 5988bdad..02eeed6e 100644
--- a/index.html
+++ b/index.html
@@ -46,12 +46,12 @@
-
+
-
+
@@ -70,12 +70,12 @@
-
+
-
+
@@ -83,7 +83,7 @@
-
+
@@ -95,24 +95,24 @@
-
+
-
-
+
+
-
+