1: 添加docker-compose文件及安装说明
parent
d274097b03
commit
c072e70708
@ -0,0 +1,46 @@
|
||||
# 程序运行时使用的目录
|
||||
TIMEZONE=Asia/Shanghai
|
||||
RUN_DATA_DIR=../data
|
||||
SPRING_PROFILES_ACTIVE=prod
|
||||
|
||||
#NACOS 配置
|
||||
NACOS_PORT_HTTP=18498
|
||||
|
||||
# mysql数据库配置
|
||||
MYSQL_PASSWORD=vp@sst0909@mysql
|
||||
MYSQL_PORT=13316
|
||||
|
||||
# redis配置
|
||||
REDIS_PASSWORD=vp-sst0909-admin
|
||||
REDIS_PORT_HTTP=16399
|
||||
|
||||
# minio 配置
|
||||
MINIO_USER=admin
|
||||
MINIO_PASSWORD=vp@sst0909@minio
|
||||
MINIO_PORT=19000
|
||||
MINIO_CONSOLE_PORT=19001
|
||||
|
||||
# paddle-speech 配置
|
||||
PADDLE_SPEECH_PORT=18090
|
||||
|
||||
# 智能问答配置
|
||||
VP_QA_PORT=8711
|
||||
|
||||
#nebula 配置
|
||||
NEBULA_GRAPH_PORT=9669
|
||||
|
||||
#nacos端口
|
||||
NACOS_NAMESPACE=prod
|
||||
|
||||
# 后端服务暴露端口
|
||||
PATIENT_WEB_PORT=8899
|
||||
PATIENT_NACOS_SERVER_IP=virtual-patient-nacos
|
||||
MANAGE_WEB_PORT=8891
|
||||
GRAPH_WEB_PORT=8892
|
||||
|
||||
|
||||
# nginx 代理配置
|
||||
UPSTREAM_WEB_SERVERS=virtual-patient-web:8899
|
||||
UPSTREAM_MANAGE_SERVERS=virtual-patient-manage:8891
|
||||
UPSTREAM_GRAPH_SERVERS=virtual-patient-graph:8892
|
||||
NGINX_HTTPS_PORT=443
|
@ -0,0 +1,90 @@
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
container_name: vp-mysql-compose
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=${MYSQL_PASSWORD}
|
||||
- TZ=${TIMEZONE}
|
||||
command:
|
||||
--max_connections=100
|
||||
--character-set-server=utf8mb4
|
||||
--collation-server=utf8mb4_general_ci
|
||||
--default-authentication-plugin=mysql_native_password
|
||||
--tls_version="TLSv1.2,TLSv1.3"
|
||||
ports:
|
||||
- ${MYSQL_PORT}:3306
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/mysql/data:/var/lib/mysql
|
||||
- ${RUN_DATA_DIR}/initdb/:/docker-entrypoint-initdb.d/
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin" ,"ping", "-uroot", "-p${MYSQL_PASSWORD}"]
|
||||
interval: 10s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
restart: always
|
||||
|
||||
minio:
|
||||
image: quay.io/minio/minio:RELEASE.2023-10-25T06-33-25Z
|
||||
container_name: vp-minio-compose
|
||||
command: server --console-address ":9001" /data
|
||||
ports:
|
||||
- ${MINIO_PORT}:9000
|
||||
- ${MINIO_CONSOLE_PORT}:9001
|
||||
environment:
|
||||
- MINIO_ROOT_USER=${MINIO_USER}
|
||||
- MINIO_ROOT_PASSWORD=${MINIO_PASSWORD}
|
||||
- TZ=${TIMEZONE}
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/minio/data:/data
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: always
|
||||
|
||||
redis:
|
||||
image: redis/redis-stack-server:7.2.0-v10
|
||||
container_name: vp-redis-stack-compose
|
||||
ports:
|
||||
- ${REDIS_PORT_HTTP}:6379
|
||||
environment:
|
||||
- REDIS_ARGS=--requirepass ${REDIS_PASSWORD}
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/redis/conf/redis-stack.conf:/etc/redis-stack.conf
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: always
|
||||
|
||||
nacos:
|
||||
image: nacos/nacos-server:v2.3.2
|
||||
container_name: virtual-patient-nacos
|
||||
ports:
|
||||
- ${NACOS_PORT_HTTP}:8848
|
||||
environment:
|
||||
- MODE=standalone
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/nacos/data/:/home/nacos/data
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: always
|
||||
|
||||
paddlespeech:
|
||||
image: paddlespeech-dev:1.1.0
|
||||
container_name: vp-paddlespeech-compose
|
||||
ports:
|
||||
- ${PADDLE_SPEECH_PORT}:8090
|
||||
command: sh /paddlespeech.sh &
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: always
|
||||
virtual-patient-qa:
|
||||
image: virtual-patient-qa:1.0.0
|
||||
container_name: vp-qa-compose
|
||||
ports:
|
||||
- ${VP_QA_PORT}:8000
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/virtual_patient_qa/:/data/vp/virtual_patient_qa/
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: always
|
@ -0,0 +1,107 @@
|
||||
version: '3.4'
|
||||
services:
|
||||
metad0:
|
||||
image: vesoft/nebula-metad:v3.6.0
|
||||
container_name: vp-nebula-metad-compose
|
||||
environment:
|
||||
USER: root
|
||||
command:
|
||||
- --meta_server_addrs=metad0:9559
|
||||
- --local_ip=metad0
|
||||
- --ws_ip=metad0
|
||||
- --port=9559
|
||||
- --ws_http_port=19559
|
||||
- --data_path=/data/meta
|
||||
- --log_dir=/logs
|
||||
- --v=0
|
||||
- --minloglevel=0
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-sf", "http://metad0:19559/status"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
ports:
|
||||
- 9559:9559
|
||||
- 19559:19559
|
||||
- 19560
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/nebula/meta0:/data/meta
|
||||
- ${RUN_DATA_DIR}/nebula/log//meta0:/logs
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: on-failure
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
|
||||
storaged0:
|
||||
image: vesoft/nebula-storaged:v3.6.0
|
||||
container_name: vp-nebula-storaged-compose
|
||||
environment:
|
||||
USER: root
|
||||
TZ: "${TIMEZONE}"
|
||||
command:
|
||||
- --meta_server_addrs=metad0:9559
|
||||
- --local_ip=storaged0
|
||||
- --ws_ip=storaged0
|
||||
- --port=9779
|
||||
- --ws_http_port=19779
|
||||
- --data_path=/data/storage
|
||||
- --log_dir=/logs
|
||||
- --v=0
|
||||
- --minloglevel=0
|
||||
depends_on:
|
||||
- metad0
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-sf", "http://storaged0:19779/status"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
ports:
|
||||
- 9779:9779
|
||||
- 19779:19779
|
||||
- 19780
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/nebula/data/storage0:/data/storage
|
||||
- ${RUN_DATA_DIR}/nebula/log/storage0:/logs
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: on-failure
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
|
||||
graphd:
|
||||
image: vesoft/nebula-graphd:v3.6.0
|
||||
container_name: vp-nebula-graphd-compose
|
||||
environment:
|
||||
USER: root
|
||||
TZ: "${TIMEZONE}"
|
||||
command:
|
||||
- --meta_server_addrs=metad0:9559
|
||||
- --port=9669
|
||||
- --local_ip=graphd
|
||||
- --ws_ip=graphd
|
||||
- --ws_http_port=19669
|
||||
- --log_dir=/logs
|
||||
- --v=0
|
||||
- --minloglevel=0
|
||||
depends_on:
|
||||
- storaged0
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-sf", "http://graphd:19669/status"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
ports:
|
||||
- 9669:9669
|
||||
- 19669:19669
|
||||
- 19670
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/nebula/log/graph:/logs
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: on-failure
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
@ -0,0 +1,101 @@
|
||||
include:
|
||||
- path: ./docker-compose-base.yml
|
||||
- path: ./docker-compose-nebula.yml
|
||||
env_file: ./.env
|
||||
|
||||
services:
|
||||
virtual-patient-web:
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_started
|
||||
nacos:
|
||||
condition: service_started
|
||||
image: virtual-patient-web:2.0.0
|
||||
container_name: virtual-patient-web-compose
|
||||
ports:
|
||||
- ${PATIENT_WEB_PORT}:8899
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/virtual-patient-web/:/data/vp/
|
||||
command:
|
||||
--spring.profiles.active=${SPRING_PROFILES_ACTIVE}
|
||||
--spring.cloud.nacos.config.server-addr=virtual-patient-nacos:8848
|
||||
--spring.cloud.nacos.config.namespace=${NACOS_NAMESPACE}
|
||||
--spring.cloud.nacos.discovery.server-addr=virtual-patient-nacos:8848
|
||||
--spring.cloud.nacos.discovery.namespace=${NACOS_NAMESPACE}
|
||||
environment:
|
||||
- TZ=${TIMEZONE}
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: always
|
||||
virtual-patient-manage:
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_started
|
||||
nacos:
|
||||
condition: service_started
|
||||
image: virtual-patient-manage:2.0.0
|
||||
container_name: virtual-patient-manage-compose
|
||||
ports:
|
||||
- ${MANAGE_WEB_PORT}:8891
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/virtual-patient-manage/:/data/vp/
|
||||
command:
|
||||
--spring.profiles.active=${SPRING_PROFILES_ACTIVE}
|
||||
--spring.cloud.nacos.config.server-addr=virtual-patient-nacos:8848
|
||||
--spring.cloud.nacos.config.namespace=${NACOS_NAMESPACE}
|
||||
--spring.cloud.nacos.discovery.server-addr=virtual-patient-nacos:8848
|
||||
--spring.cloud.nacos.discovery.namespace=${NACOS_NAMESPACE}
|
||||
environment:
|
||||
- TZ=${TIMEZONE}
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: always
|
||||
virtual-patient-graph:
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_started
|
||||
nacos:
|
||||
condition: service_started
|
||||
image: virtual-patient-graph:2.0.0
|
||||
container_name: virtual-patient-graph-compose
|
||||
ports:
|
||||
- ${GRAPH_WEB_PORT}:8892
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/virtual-patient-graph/:/data/vp/
|
||||
command:
|
||||
--spring.profiles.active=${SPRING_PROFILES_ACTIVE}
|
||||
--spring.cloud.nacos.config.server-addr=virtual-patient-nacos:8848
|
||||
--spring.cloud.nacos.config.namespace=${NACOS_NAMESPACE}
|
||||
--spring.cloud.nacos.discovery.server-addr=virtual-patient-nacos:8848
|
||||
--spring.cloud.nacos.discovery.namespace=${NACOS_NAMESPACE}
|
||||
environment:
|
||||
- TZ=${TIMEZONE}
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: always
|
||||
virtual-patient-nginx:
|
||||
depends_on:
|
||||
virtual-patient-web:
|
||||
condition: service_started
|
||||
virtual-patient-manage:
|
||||
condition: service_started
|
||||
virtual-patient-graph:
|
||||
condition: service_started
|
||||
image: virtual-patient-nginx:1.1.0
|
||||
container_name: virtual-patient-nginx-compose
|
||||
ports:
|
||||
- ${NGINX_HTTPS_PORT}:443
|
||||
volumes:
|
||||
- ${RUN_DATA_DIR}/html/:/usr/share/nginx/html/
|
||||
environment:
|
||||
- TZ=${TIMEZONE}
|
||||
- UPSTREAM_WEB_SERVERS=${UPSTREAM_WEB_SERVERS}
|
||||
- UPSTREAM_MANAGE_SERVERS=${UPSTREAM_MANAGE_SERVERS}
|
||||
- UPSTREAM_GRAPH_SERVERS=${UPSTREAM_GRAPH_SERVERS}
|
||||
networks:
|
||||
- virtual-patient-network
|
||||
restart: always
|
||||
|
||||
networks:
|
||||
virtual-patient-network:
|
||||
driver: bridge
|
Loading…
Reference in New Issue