test
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# 主应用服务
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: archive
|
||||
container_name: digital-archive-app
|
||||
ports:
|
||||
- "9081:9081"
|
||||
@@ -20,29 +15,21 @@ services:
|
||||
environment:
|
||||
- SPRING_PROFILES_ACTIVE=prod
|
||||
- SERVER_PORT=9081
|
||||
# 数据库配置
|
||||
- DB_HOST=database
|
||||
- DB_PORT=54321
|
||||
- DB_NAME=enterprise_digital_archives
|
||||
- DB_USERNAME=system
|
||||
- DB_PASSWORD=12345678ab
|
||||
# Redis配置
|
||||
- REDIS_HOST=redis
|
||||
- REDIS_PORT=6379
|
||||
- REDIS_PASSWORD=Abc123456
|
||||
# Elasticsearch配置 - 使用已有的 "es" 容器
|
||||
- ELASTICSEARCH_HOST=es
|
||||
- ELASTICSEARCH_PORT=9200
|
||||
- ELASTICSEARCH_SCHEME=http
|
||||
# OCR配置
|
||||
- TESS_PATH=/usr/bin/tesseract
|
||||
# 其他配置
|
||||
- SWAGGER_SHOW=false
|
||||
- LOG_ROOT_LEVEL=info
|
||||
- LOG_APP_LEVEL=info
|
||||
depends_on:
|
||||
- database
|
||||
- redis
|
||||
networks:
|
||||
- proxy
|
||||
restart: unless-stopped
|
||||
@@ -52,66 +39,6 @@ services:
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
|
||||
# 人大金仓数据库(示例)
|
||||
database:
|
||||
image: kingbase:v8.6.0
|
||||
container_name: digital-archive-db
|
||||
ports:
|
||||
- "54321:54321"
|
||||
environment:
|
||||
- KINGBASE_USER=system
|
||||
- KINGBASE_PASSWORD=12345678ab
|
||||
- KINGBASE_DATABASE=enterprise_digital_archives
|
||||
volumes:
|
||||
- ./data/database:/var/lib/kingbase/data
|
||||
- ./init-scripts:/docker-entrypoint-initdb.d
|
||||
networks:
|
||||
- proxy
|
||||
restart: unless-stopped
|
||||
|
||||
# Redis缓存
|
||||
redis:
|
||||
image: redis:6-alpine
|
||||
container_name: digital-archive-redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
command: redis-server --requirepass Abc123456
|
||||
volumes:
|
||||
- ./data/redis:/data
|
||||
networks:
|
||||
- proxy
|
||||
restart: unless-stopped
|
||||
|
||||
# Elasticsearch - 使用已有的 "es" 容器
|
||||
# 注意:确保已有的 "es" 容器已连接到 proxy 网络
|
||||
|
||||
# Nginx反向代理(可选)
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: digital-archive-nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/ssl:/etc/nginx/ssl
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
- proxy
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
proxy:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
upload-data:
|
||||
temp-data:
|
||||
unzip-data:
|
||||
images-data:
|
||||
reports-data:
|
||||
database-data:
|
||||
redis-data:
|
||||
elasticsearch-data:
|
||||
Reference in New Issue
Block a user