(improvement)(docker) Supports three types of mount methods: Named Volumes, Bind Mounts, and Detailed Bind Mounts. (#1420)

This commit is contained in:
lexluo09
2024-07-17 23:19:28 +08:00
committed by GitHub
parent 2cec2e61bc
commit f30c74c18f
2 changed files with 19 additions and 2 deletions

View File

@@ -12,6 +12,11 @@ RUN apt-get update && \
apt-get install -y default-mysql-client unzip && \
rm -rf /var/lib/apt/lists/*
# Install the vim editor.
RUN apt-get update && \
apt-get install -y vim && \
rm -rf /var/lib/apt/lists/*
# Copy the supersonic standalone zip file into the container
COPY assembly/build/supersonic-standalone-${SUPERSONIC_VERSION}.zip .

View File

@@ -101,10 +101,22 @@ services:
- 114.114.114.114
- 8.8.8.8
- 8.8.4.4
volumes:
#1.Named Volumes are best for persistent data managed by Docker.
- supersonic_data:/usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}
#2.Bind Mounts are suitable for frequent modifications and debugging.
# - ./conf/langchain4j-prd.yaml:/usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}/conf/langchain4j-prd.yaml
#3.Detailed Bind Mounts offer more control over the mount behavior.
# - type: bind
# source: ./supersonic-standalone-${SUPERSONIC_VERSION:-latest}/logs
# target: /usr/src/app/supersonic-standalone-${SUPERSONIC_VERSION:-latest}/logs
# bind:
# propagation: rprivate
# create_host_path: true
volumes:
mysql_data:
chroma_data:
supersonic_data:
networks:
supersonic_network: