mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(improvement)(chat) Support specifying spring.profiles.active at runtime to optimize the entire Docker deployment script. (#1302)
This commit is contained in:
@@ -26,4 +26,4 @@ WORKDIR /usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION}
|
||||
EXPOSE 9080
|
||||
# Command to run the supersonic daemon
|
||||
RUN chmod +x bin/supersonic-daemon.sh
|
||||
CMD ["bash", "-c", "bin/supersonic-daemon.sh restart && tail -f /dev/null"]
|
||||
CMD ["bash", "-c", "bin/supersonic-daemon.sh restart prd && tail -f /dev/null"]
|
||||
36
docker/docker-build.bat
Normal file
36
docker/docker-build.bat
Normal file
@@ -0,0 +1,36 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
REM Function to execute the build script
|
||||
:execute_build_script
|
||||
echo Executing build script: assembly\bin\supersonic-build.bat
|
||||
call assembly\bin\supersonic-build.bat
|
||||
if %errorlevel% neq 0 (
|
||||
echo Build script failed. Exiting.
|
||||
exit /b 1
|
||||
)
|
||||
goto :eof
|
||||
|
||||
REM Function to build the Docker image
|
||||
:build_docker_image
|
||||
set "version=%1"
|
||||
echo Building Docker image: supersonic:%version%
|
||||
docker build --no-cache --build-arg SUPERSONIC_VERSION=%version% -t supersonic:%version% -f docker\Dockerfile .
|
||||
if %errorlevel% neq 0 (
|
||||
echo Docker build failed. Exiting.
|
||||
exit /b 1
|
||||
)
|
||||
echo Docker image supersonic:%version% built successfully.
|
||||
goto :eof
|
||||
|
||||
REM Main script execution
|
||||
set "VERSION=%1"
|
||||
if "%VERSION%"=="" (
|
||||
echo Usage: %0 ^<version^>
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
call :execute_build_script
|
||||
call :build_docker_image %VERSION%
|
||||
|
||||
endlocal
|
||||
@@ -19,7 +19,7 @@ services:
|
||||
- 8.8.4.4
|
||||
|
||||
db_init:
|
||||
image: supersonic:0.9.2-SNAPSHOT
|
||||
image: supersonicbi/supersonic:0.9.2-SNAPSHOT
|
||||
container_name: supersonic_db_init
|
||||
depends_on:
|
||||
- mysql
|
||||
@@ -51,7 +51,7 @@ services:
|
||||
- 8.8.4.4
|
||||
|
||||
java_backend:
|
||||
image: supersonic:0.9.2-SNAPSHOT
|
||||
image: supersonicbi/supersonic:0.9.2-SNAPSHOT
|
||||
container_name: supersonic_java_backend
|
||||
environment:
|
||||
DB_HOST: supersonic_mysql
|
||||
|
||||
Reference in New Issue
Block a user