Enhance startup scripts with environment update checks and service URL clarity

- Added checks for the existence of the update-docker-env.sh script in both start.bat and start.sh, providing guidance for updating environment variables.
- Removed legacy .env file checks from both scripts to streamline the startup process.
- Updated service URL outputs to clarify SSL options for both frontend and backend services.
- Improved user instructions for stopping services and updating environment variables.
This commit is contained in:
chamiakJ
2025-04-28 21:54:31 +05:30
parent bf1d48709c
commit ad0cdfe1d9
2 changed files with 20 additions and 25 deletions

View File

@@ -39,6 +39,12 @@ IF %ERRORLEVEL% NEQ 0 (
echo docker-compose is installed >> worklenz_startup.log
)
REM Check for update-docker-env.sh
IF EXIST update-docker-env.sh (
echo [94mFound update-docker-env.sh script. You can use it to update environment variables.[0m
echo Found update-docker-env.sh script >> worklenz_startup.log
)
REM Run preflight checks
echo Running Docker daemon check...
docker info >nul 2>>worklenz_startup.log
@@ -52,17 +58,6 @@ IF %ERRORLEVEL% NEQ 0 (
echo Docker daemon is running >> worklenz_startup.log
)
REM Check if .env file exists
IF NOT EXIST .env (
echo Warning: .env file not found. Using default configuration.
echo Warning: .env file not found. Using default configuration. >> worklenz_startup.log
IF EXIST .env.example (
copy .env.example .env
echo Created .env file from .env.example
echo Created .env file from .env.example >> worklenz_startup.log
)
)
REM Stop any running containers
echo Stopping any running containers...
docker-compose down > nul 2>>worklenz_startup.log
@@ -111,7 +106,7 @@ REM Check frontend
findstr /C:"frontend" running_services.txt > nul
IF %ERRORLEVEL% EQU 0 (
echo [92m^✓[0m Frontend is running
echo Frontend URL: http://localhost:5000
echo Frontend URL: http://localhost:5000 (or https://localhost:5000 if SSL is enabled)
echo Frontend is running >> worklenz_startup.log
) ELSE (
echo [91m^✗[0m Frontend service failed to start
@@ -122,7 +117,7 @@ REM Check backend
findstr /C:"backend" running_services.txt > nul
IF %ERRORLEVEL% EQU 0 (
echo [92m^✓[0m Backend is running
echo Backend URL: http://localhost:3000
echo Backend URL: http://localhost:3000 (or https://localhost:3000 if SSL is enabled)
echo Backend is running >> worklenz_startup.log
) ELSE (
echo [91m^✗[0m Backend service failed to start
@@ -180,6 +175,9 @@ IF %allRunning% EQU 1 (
echo You can access the application at: http://localhost:5000
echo To stop the services, run: stop.bat
echo To update environment variables, run: update-docker-env.sh
echo.
echo Note: To enable SSL, set ENABLE_SSL=true in your .env file and run update-docker-env.sh
echo.
echo For any errors, check worklenz_startup.log file
echo.