update:修改启动和编译的脚本

This commit is contained in:
divenswu 2022-11-30 16:57:59 +08:00
parent 6007220504
commit 17b2d05b1e
2 changed files with 17 additions and 4 deletions

View File

@ -11,6 +11,9 @@ services:
TZ: Asia/Shanghai TZ: Asia/Shanghai
expose: expose:
- "3306" - "3306"
## 若需要远程访问mysql请打开下面的配置 ##
# ports:
# - "3306:3306"
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
volumes: volumes:
- ${FACESEARCH_VOLUME_DIRECTORY:-.}/volumes-face-search/mysql:/var/lib/mysql - ${FACESEARCH_VOLUME_DIRECTORY:-.}/volumes-face-search/mysql:/var/lib/mysql
@ -24,6 +27,10 @@ services:
expose: expose:
- "9200" - "9200"
- "9600" - "9600"
## 若需要远程访问opensearch请打开下面的配置 ##
# ports:
# - "9200:9200"
# - "9600:9600"
volumes: volumes:
- ${FACESEARCH_VOLUME_DIRECTORY:-.}/volumes-face-search/opensearch/data:/usr/share/opensearch/data - ${FACESEARCH_VOLUME_DIRECTORY:-.}/volumes-face-search/opensearch/data:/usr/share/opensearch/data
restart: always restart: always
@ -41,7 +48,7 @@ services:
visual-facesearch: visual-facesearch:
container_name: face-search-server-standalone container_name: face-search-server-standalone
image: divenswu/face-search:2.0.0 image: divenswu/face-search:2.0.1
environment: environment:
SPRING_DATASOURCE_URL: 'jdbc:mysql://visual-mysql:3306/visual_face_search?useUnicode=true&characterEncoding=utf8' SPRING_DATASOURCE_URL: 'jdbc:mysql://visual-mysql:3306/visual_face_search?useUnicode=true&characterEncoding=utf8'
SPRING_DATASOURCE_USERNAME: root SPRING_DATASOURCE_USERNAME: root
@ -49,11 +56,17 @@ services:
VISUAL_ENGINE_OPENSEARCH_HOST: visual-opensearch VISUAL_ENGINE_OPENSEARCH_HOST: visual-opensearch
VISUAL_ENGINE_OPENSEARCH_PORT: 9200 VISUAL_ENGINE_OPENSEARCH_PORT: 9200
VISUAL_SWAGGER_ENABLE: 'true' VISUAL_SWAGGER_ENABLE: 'true'
JAVA_OPTS: '-XX:MaxDirectMemorySize=400M' JAVA_OPTS: '-XX:MaxDirectMemorySize=400M -Xmx1536m -Xms1536m' #线上环境自行修改#
volumes: volumes:
- ${FACESEARCH_VOLUME_DIRECTORY:-.}/volumes-face-search/search/logs:/app/face-search/logs - ${FACESEARCH_VOLUME_DIRECTORY:-.}/volumes-face-search/search/logs:/app/face-search/logs
ports: ports:
- "56789:8080" - "56789:8080"
deploy:
resources:
limits:
memory: 2G #线上环境自行修改#
reservations:
memory: 1G #线上环境自行修改#
depends_on: depends_on:
- "visual-mysql" - "visual-mysql"
- "visual-opensearch" - "visual-opensearch"

View File

@ -1,4 +1,4 @@
version='2.0.0' version='2.0.1'
SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) SHELL_FOLDER=$(cd "$(dirname "$0")";pwd)
cd ${SHELL_FOLDER} cd ${SHELL_FOLDER}