When changing the frontend URL:port in the .env file of the genlayer-simulator repository and restarting all Docker containers, the URL:port change is not applied. The configuration seems to be baked into the Docker image at build time. Deleting the frontend image and rebuilding it reflects the new URL:port, but this is not an efficient workflow.
To Reproduce
Clone the genlayer-simulator repository.
Build and start the Docker containers using docker compose up -d.
Change the VITE_WS_SERVER_URL or VITE_JSON_RPC_SERVER_URL values in the .env file.
Restart the containers using docker compose down && docker compose up -d command.
Access the frontend application and notice that it's still running on the old URL/port.
Expected behavior
Changing the VITE_WS_SERVER_URL or VITE_JSON_RPC_SERVER_URL values in the .env file and restarting the containers should update the frontend to run on the new URL:port without needing to rebuild the Docker image. JSON-RPC container supports this without any issues.
Actual behavior
The frontend continues to run on the old URL:port unless the Docker image is deleted and rebuilt.
Suggested Solution
Implement dynamic configuration for the frontend URL:port so that it reads the VITE_WS_SERVER_URL or VITE_JSON_RPC_SERVER_URL values from the .env file at runtime instead of build time. This could involve:
Adjusting the frontend application's startup script to read the URL:port configuration when the container starts.
Additional context
This enhancement would streamline development and deployment processes by eliminating the need to rebuild the Docker image for port changes.
Describe the bug
When changing the frontend URL:port in the .env file of the genlayer-simulator repository and restarting all Docker containers, the URL:port change is not applied. The configuration seems to be baked into the Docker image at build time. Deleting the frontend image and rebuilding it reflects the new URL:port, but this is not an efficient workflow.
To Reproduce
VITE_WS_SERVER_URL
orVITE_JSON_RPC_SERVER_URL
values in the .env file.docker compose down && docker compose up -d
command.Expected behavior
Changing the
VITE_WS_SERVER_URL
orVITE_JSON_RPC_SERVER_URL
values in the .env file and restarting the containers should update the frontend to run on the new URL:port without needing to rebuild the Docker image. JSON-RPC container supports this without any issues.Actual behavior
The frontend continues to run on the old URL:port unless the Docker image is deleted and rebuilt.
Suggested Solution
Implement dynamic configuration for the frontend URL:port so that it reads the
VITE_WS_SERVER_URL
orVITE_JSON_RPC_SERVER_URL
values from the .env file at runtime instead of build time. This could involve:Additional context
This enhancement would streamline development and deployment processes by eliminating the need to rebuild the Docker image for port changes.