feat(datasync): add data synchronization service with PostgreSQL and DM support
- Configure PostgreSQL and DM datasources in application.yml - Set up MyBatis-Plus for database operations - Add server configuration for datasync service - Define Docker Compose service for hsz-datasync - Include environment variables and volume mapping - Set entrypoint for datasync service startupmaster
parent
db53639c2a
commit
a3e87db7ce
|
|
@ -33,4 +33,17 @@ services:
|
|||
- TZ=Asia/Shanghai
|
||||
depends_on:
|
||||
- hsz-redis
|
||||
entrypoint: java -cp "gunshi-project-hsz-1.0-SNAPSHOT.jar:./lib/*" com.gunshi.project.hsz.Main
|
||||
entrypoint: java -cp "gunshi-project-hsz-1.0-SNAPSHOT.jar:./lib/*" com.gunshi.project.hsz.Main
|
||||
|
||||
hsz-datasync:
|
||||
container_name: hsz-datasync
|
||||
image: openjdk:21
|
||||
working_dir: /app
|
||||
networks:
|
||||
- tsg-bridge
|
||||
volumes:
|
||||
- /opt/hsz/java:/app
|
||||
environment:
|
||||
- SPRING_PROFILES_ACTIVE=prod
|
||||
- TZ=Asia/Shanghai
|
||||
entrypoint: java -cp "gunshi-project-hsz-datasync-1.0-SNAPSHOT.jar:./lib/*" com.gunshi.project.hsz.datasync.Main
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
server:
|
||||
port: 24205
|
||||
servlet:
|
||||
context-path: /gunshiApp/hsz-datasync
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
global-config:
|
||||
db-config:
|
||||
update-strategy: always
|
||||
|
||||
spring:
|
||||
profiles:
|
||||
active: prod
|
||||
datasource:
|
||||
dynamic:
|
||||
primary: master
|
||||
datasource:
|
||||
master:
|
||||
url: jdbc:postgresql://postgres:5432/hsz?stringtype=unspecified
|
||||
username: gunshiiot
|
||||
password: 1234567a
|
||||
driver-class-name: org.postgresql.Driver
|
||||
jcsk: # 达梦数据源命名为jcsk
|
||||
driver-class-name: dm.jdbc.driver.DmDriver
|
||||
url: jdbc:dm://10.42.6.247:5236
|
||||
username: SK_ZD001
|
||||
password: Sk@123456
|
||||
hikari:
|
||||
maximum-pool-size: 20
|
||||
minimum-idle: 5
|
||||
connection-timeout: 30000
|
||||
Loading…
Reference in New Issue