mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
[improvement][project]Adapt docker related scripts to new version.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Use an official OpenJDK runtime as a parent image
|
||||
FROM openjdk:8-jdk
|
||||
FROM openjdk:21-jdk-bullseye
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /usr/src/app
|
||||
@@ -7,8 +7,6 @@ WORKDIR /usr/src/app
|
||||
# Argument to pass in the supersonic version at build time
|
||||
ARG SUPERSONIC_VERSION
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
# Install necessary packages, including Postgres client
|
||||
RUN apt-get update && apt-get install -y postgresql-client
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SUPERSONIC_VERSION=0.9.10-SNAPSHOT docker-compose -f docker-compose.yml -p supersonic up
|
||||
SUPERSONIC_VERSION=latest docker-compose -f docker-compose.yml -p supersonic up
|
||||
@@ -11,8 +11,8 @@ services:
|
||||
POSTGRES_PASSWORD: supersonic_password
|
||||
ports:
|
||||
- "15432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql
|
||||
# volumes:
|
||||
# - postgres_data:/var/lib/postgresql
|
||||
networks:
|
||||
- supersonic_network
|
||||
dns:
|
||||
@@ -72,9 +72,9 @@ services:
|
||||
- 114.114.114.114
|
||||
- 8.8.8.8
|
||||
- 8.8.4.4
|
||||
volumes:
|
||||
#volumes:
|
||||
#1.Named Volumes are best for persistent data managed by Docker.
|
||||
- supersonic_data:/usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}
|
||||
#- supersonic_data:/usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}
|
||||
#2.Bind Mounts are suitable for frequent modifications and debugging.
|
||||
# - ./conf/application-prd.yaml:/usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}/conf/application-prd.yaml
|
||||
#3.Detailed Bind Mounts offer more control over the mount behavior.
|
||||
@@ -84,9 +84,9 @@ services:
|
||||
# bind:
|
||||
# propagation: rprivate
|
||||
# create_host_path: true
|
||||
volumes:
|
||||
postgres_data:
|
||||
supersonic_data:
|
||||
#volumes:
|
||||
# postgres_data:
|
||||
# supersonic_data:
|
||||
|
||||
networks:
|
||||
supersonic_network:
|
||||
@@ -12,6 +12,7 @@ TAGS="latest"
|
||||
# If VERSION is provided, add it to TAGS and tag the image as latest
|
||||
if [ -n "$VERSION" ]; then
|
||||
TAGS="$TAGS $VERSION"
|
||||
echo "Tagging Docker images $IMAGE_NAME:$VERSION to $IMAGE_NAME:latest"
|
||||
docker tag $IMAGE_NAME:$VERSION $IMAGE_NAME:latest
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user