init: 信创文件安全传输系统内外网本地 Docker 部署
包含 s-file 后端、React 前端、MeshSafe 安全检测对接,以及内外网两套 compose/nginx/配置(仅前端 28180/28280 对外发布,其余端口不暴露)。 说明:deploy/config/application-iw.yml 与 application-ow.yml 按维护者 明确要求原样入库,其中含本机 Docker 用的库口令、RabbitMQ 口令与 JWT 密钥;上生产前需替换。
This commit is contained in:
115
deploy/config/application-iw.yml
Normal file
115
deploy/config/application-iw.yml
Normal file
@@ -0,0 +1,115 @@
|
||||
# s-file 内网侧(file.transfer.location=1)本地联调配置
|
||||
# 仅本机 docker 部署使用,密码与 JWT secret 不要带到生产
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: s-file
|
||||
datasource:
|
||||
url: jdbc:postgresql://pg-iw:5432/s_file
|
||||
driver-class-name: org.postgresql.Driver
|
||||
username: sfile
|
||||
password: sfile_iw_2026
|
||||
druid:
|
||||
initial-size: 2
|
||||
min-idle: 2
|
||||
max-active: 10
|
||||
validation-query: SELECT 1
|
||||
redis:
|
||||
host: redis-iw
|
||||
port: 6379
|
||||
timeout: 5000
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8
|
||||
max-idle: 4
|
||||
rabbitmq:
|
||||
host: mq-iw
|
||||
port: 5672
|
||||
username: sfile
|
||||
password: sfile_mq_iw_2026
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 500MB
|
||||
max-request-size: 500MB
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:com/senmesh/**/mapper/*.xml
|
||||
|
||||
# 平台编码(init-data 中 uc_platform.platform_code=1)
|
||||
system:
|
||||
code: 1
|
||||
|
||||
# 发号器雪花 workerId:键为 compose 中固定的容器 IP
|
||||
"[code.snowflake.workid.172.25.18.10]": 1
|
||||
|
||||
security:
|
||||
jwt:
|
||||
enable: true
|
||||
secret: sfile-local-iw-secret-key-please-change-0123456789abcdef
|
||||
expiration: 86400000
|
||||
header: Authorization
|
||||
ignoring: /error,/favicon.ico
|
||||
login-page: /login
|
||||
superior-only: false
|
||||
use-local: true
|
||||
allow-if-all-abstain-decisions: true
|
||||
oauth2:
|
||||
enable: false
|
||||
not-logs: ""
|
||||
anonymous: ""
|
||||
|
||||
# 新用户初始密码
|
||||
user:
|
||||
default:
|
||||
password: Qaz123567!@#
|
||||
|
||||
file:
|
||||
upload-dir: /data/upload
|
||||
storage:
|
||||
type: local
|
||||
transfer:
|
||||
# 内网侧
|
||||
location: "1"
|
||||
# send-dir 与外网侧 receive-dir 指向同一摆渡目录,反之亦然
|
||||
send-dir: /data/transfer/send
|
||||
receive-dir: /data/transfer/receive
|
||||
unpack-risk-check: false
|
||||
|
||||
dify:
|
||||
risk:
|
||||
rule:
|
||||
api-key: test-rule-key
|
||||
scan:
|
||||
api-key: test-scan-key
|
||||
|
||||
# MeshSafe 文件安全检测:复用本机已部署的 meshsafe-nginx(44380)
|
||||
# 凭证需存在于 MeshSafe .env 的 MESHSAFE_API_CLIENTS 白名单中
|
||||
meshsafe:
|
||||
enabled: true
|
||||
base-url: http://host.docker.internal:44380
|
||||
client-id: test-client
|
||||
secret: test-secret
|
||||
channel: sfile-iw
|
||||
timeout-seconds: 120
|
||||
fail-open: true
|
||||
poll-timeout-minutes: 60
|
||||
review-sync-to-meshsafe: true
|
||||
poll:
|
||||
cron: "0/10 * * * * ?"
|
||||
|
||||
rabbitmq:
|
||||
custom:
|
||||
topic-exchange-name: s-file-iw-topic
|
||||
delayed-exchange-name: s-file-iw-delayed
|
||||
broadcast-id: s-file-iw-broadcast
|
||||
|
||||
swagger:
|
||||
enable: false
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.senmesh: info
|
||||
115
deploy/config/application-ow.yml
Normal file
115
deploy/config/application-ow.yml
Normal file
@@ -0,0 +1,115 @@
|
||||
# s-file 外网侧(file.transfer.location=2)本地联调配置
|
||||
# 仅本机 docker 部署使用,密码与 JWT secret 不要带到生产
|
||||
server:
|
||||
port: 8080
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: s-file
|
||||
datasource:
|
||||
url: jdbc:postgresql://pg-ow:5432/s_file
|
||||
driver-class-name: org.postgresql.Driver
|
||||
username: sfile
|
||||
password: sfile_ow_2026
|
||||
druid:
|
||||
initial-size: 2
|
||||
min-idle: 2
|
||||
max-active: 10
|
||||
validation-query: SELECT 1
|
||||
redis:
|
||||
host: redis-ow
|
||||
port: 6379
|
||||
timeout: 5000
|
||||
lettuce:
|
||||
pool:
|
||||
max-active: 8
|
||||
max-idle: 4
|
||||
rabbitmq:
|
||||
host: mq-ow
|
||||
port: 5672
|
||||
username: sfile
|
||||
password: sfile_mq_ow_2026
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 500MB
|
||||
max-request-size: 500MB
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:com/senmesh/**/mapper/*.xml
|
||||
|
||||
# 平台编码(init-data 中 uc_platform.platform_code=1)
|
||||
system:
|
||||
code: 1
|
||||
|
||||
# 发号器雪花 workerId:键为 compose 中固定的容器 IP;两侧 workerId 必须不同
|
||||
"[code.snowflake.workid.172.25.28.10]": 2
|
||||
|
||||
security:
|
||||
jwt:
|
||||
enable: true
|
||||
secret: sfile-local-ow-secret-key-please-change-0123456789abcdef
|
||||
expiration: 86400000
|
||||
header: Authorization
|
||||
ignoring: /error,/favicon.ico
|
||||
login-page: /login
|
||||
superior-only: false
|
||||
use-local: true
|
||||
allow-if-all-abstain-decisions: true
|
||||
oauth2:
|
||||
enable: false
|
||||
not-logs: ""
|
||||
anonymous: ""
|
||||
|
||||
# 新用户初始密码
|
||||
user:
|
||||
default:
|
||||
password: Qaz123567!@#
|
||||
|
||||
file:
|
||||
upload-dir: /data/upload
|
||||
storage:
|
||||
type: local
|
||||
transfer:
|
||||
# 外网侧:与内网侧相反
|
||||
location: "2"
|
||||
# compose 里 send-dir 挂到 gate/ow2iw、receive-dir 挂到 gate/iw2ow
|
||||
send-dir: /data/transfer/send
|
||||
receive-dir: /data/transfer/receive
|
||||
unpack-risk-check: false
|
||||
|
||||
dify:
|
||||
risk:
|
||||
rule:
|
||||
api-key: test-rule-key
|
||||
scan:
|
||||
api-key: test-scan-key
|
||||
|
||||
# MeshSafe 文件安全检测:复用本机已部署的 meshsafe-nginx(44380)
|
||||
# 凭证需存在于 MeshSafe .env 的 MESHSAFE_API_CLIENTS 白名单中
|
||||
meshsafe:
|
||||
enabled: true
|
||||
base-url: http://host.docker.internal:44380
|
||||
client-id: test-client
|
||||
secret: test-secret
|
||||
channel: sfile-ow
|
||||
timeout-seconds: 120
|
||||
fail-open: true
|
||||
poll-timeout-minutes: 60
|
||||
review-sync-to-meshsafe: true
|
||||
poll:
|
||||
cron: "0/10 * * * * ?"
|
||||
|
||||
rabbitmq:
|
||||
custom:
|
||||
topic-exchange-name: s-file-ow-topic
|
||||
delayed-exchange-name: s-file-ow-delayed
|
||||
broadcast-id: s-file-ow-broadcast
|
||||
|
||||
swagger:
|
||||
enable: false
|
||||
|
||||
logging:
|
||||
level:
|
||||
com.senmesh: info
|
||||
Reference in New Issue
Block a user