mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-04-21 06:04:19 +08:00
[improvement][docker]Facilitate database configuration when running with docker.
This commit is contained in:
@@ -27,4 +27,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 standalone docker && tail -f /dev/null"]
|
||||
CMD ["bash", "-c", "bin/supersonic-daemon.sh restart standalone ${S2_DB_TYPE} && tail -f /dev/null"]
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
# Function to execute the build script
|
||||
execute_build_script() {
|
||||
echo "Executing build script: assembly/bin/supersonic-build.sh"
|
||||
assembly/bin/supersonic-build.sh
|
||||
echo "Executing build script: sh assembly/bin/supersonic-build.sh"
|
||||
sh assembly/bin/supersonic-build.sh
|
||||
}
|
||||
|
||||
# Function to build the Docker image
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SUPERSONIC_VERSION=latest docker-compose -f docker-compose.yml -p supersonic up
|
||||
@@ -30,10 +30,12 @@ services:
|
||||
privileged: true
|
||||
container_name: supersonic_standalone
|
||||
environment:
|
||||
DB_HOST: supersonic_postgres
|
||||
DB_NAME: postgres
|
||||
DB_USERNAME: supersonic_user
|
||||
DB_PASSWORD: supersonic_password
|
||||
S2_DB_TYPE: postgres
|
||||
S2_DB_HOST: supersonic_postgres
|
||||
S2_DB_PORT: 5432
|
||||
S2_DB_DATABASE: postgres
|
||||
S2_DB_USER: supersonic_user
|
||||
S2_DB_PASSWORD: supersonic_password
|
||||
ports:
|
||||
- "9080:9080"
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user