mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
chore: optimize test env script
This commit is contained in:
parent
74a92622a3
commit
b14b49f75e
@ -11,7 +11,7 @@ services:
|
|||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: 640M
|
memory: 768M
|
||||||
restart: always
|
restart: always
|
||||||
container_name: powerjob-mysql
|
container_name: powerjob-mysql
|
||||||
image: powerjob/powerjob-mysql:test_env
|
image: powerjob/powerjob-mysql:test_env
|
||||||
@ -20,38 +20,38 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ~/powerjob-data/powerjob-mysql:/var/lib/mysql
|
- ~/powerjob-data/powerjob-mysql:/var/lib/mysql
|
||||||
command: --lower_case_table_names=1
|
command: --lower_case_table_names=1
|
||||||
powerjob-mongodb:
|
# powerjob-mongodb:
|
||||||
image: mongo:latest
|
# image: mongo:latest
|
||||||
container_name: powerjob-mongodb
|
# container_name: powerjob-mongodb
|
||||||
restart: always
|
# restart: always
|
||||||
deploy:
|
# deploy:
|
||||||
resources:
|
# resources:
|
||||||
limits:
|
# limits:
|
||||||
memory: 256M
|
# memory: 256M
|
||||||
environment:
|
# environment:
|
||||||
MONGO_INITDB_ROOT_USERNAME: "root"
|
# MONGO_INITDB_ROOT_USERNAME: "root"
|
||||||
MONGO_INITDB_ROOT_PASSWORD: "No1Bug2Please3!"
|
# MONGO_INITDB_ROOT_PASSWORD: "No1Bug2Please3!"
|
||||||
MONGO_INITDB_DATABASE: "powerjob_daily"
|
# MONGO_INITDB_DATABASE: "powerjob_daily"
|
||||||
ports:
|
# ports:
|
||||||
- "27017:27017"
|
# - "27017:27017"
|
||||||
volumes:
|
# volumes:
|
||||||
- ./testenv/init_mongodb.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
|
# - ./testenv/init_mongodb.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
|
||||||
- ~/powerjob-data/powerjob-mongodb:/data/db
|
# - ~/powerjob-data/powerjob-mongodb:/data/db
|
||||||
powerjob-server:
|
powerjob-server:
|
||||||
build:
|
build:
|
||||||
context: ../../powerjob-server/docker
|
context: ../../powerjob-server/docker
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
memory: 768M
|
memory: 896M
|
||||||
container_name: powerjob-server
|
container_name: powerjob-server
|
||||||
image: powerjob/powerjob-server:test_env
|
image: powerjob/powerjob-server:test_env
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- powerjob-mysql
|
- powerjob-mysql
|
||||||
- powerjob-mongodb
|
# - powerjob-mongodb
|
||||||
environment:
|
environment:
|
||||||
PARAMS: "--spring.profiles.active=product --oms.mongodb.enable=true --spring.data.mongodb.uri=mongodb://zqq:No1Bug2Please3!@powerjob-mongodb/powerjob_daily?retryWrites=true&w=majority --spring.datasource.core.jdbc-url=jdbc:mysql://powerjob-mysql:3306/powerjob-daily?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai"
|
PARAMS: "--spring.profiles.active=daily --spring.datasource.core.jdbc-url=jdbc:mysql://powerjob-mysql:3306/powerjob-daily?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai --oms.storage.dfs.mysql_series.url=jdbc:mysql://powerjob-mysql:3306/powerjob-daily?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai"
|
||||||
JVMOPTIONS: "-server -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=7 -XX:GCLogFileSize=100M -Xloggc:/root/powerjob/server/gc.log"
|
JVMOPTIONS: "-server -XX:+UseG1GC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=7 -XX:GCLogFileSize=100M -Xloggc:/root/powerjob/server/gc.log"
|
||||||
ports:
|
ports:
|
||||||
- "7700:7700"
|
- "7700:7700"
|
||||||
|
@ -36,8 +36,8 @@ import java.util.Optional;
|
|||||||
/**
|
/**
|
||||||
* MySQL 特性类似的数据库存储
|
* MySQL 特性类似的数据库存储
|
||||||
* PS1. 大文件上传可能会报 max_allowed_packet 不足,可根据参数放开数据库限制 set global max_allowed_packet = 500*1024*1024
|
* PS1. 大文件上传可能会报 max_allowed_packet 不足,可根据参数放开数据库限制 set global max_allowed_packet = 500*1024*1024
|
||||||
* PS1. 官方基于 MySQL 测试,其他数据库使用前请自测,敬请谅解!
|
* PS2. 官方基于 MySQL 测试,其他数据库使用前请自测,敬请谅解!
|
||||||
* PS2. 数据库并不适合大规模的文件存储,该扩展仅适用于简单业务,大型业务场景请选择其他存储方案(OSS、MongoDB等)
|
* PS3. 数据库并不适合大规模的文件存储,该扩展仅适用于简单业务,大型业务场景请选择其他存储方案(OSS、MongoDB等)
|
||||||
* ********************* 配置项 *********************
|
* ********************* 配置项 *********************
|
||||||
* oms.storage.dfs.mysql_series.driver
|
* oms.storage.dfs.mysql_series.driver
|
||||||
* oms.storage.dfs.mysql_series.url
|
* oms.storage.dfs.mysql_series.url
|
||||||
|
@ -3,15 +3,19 @@ logging.config=classpath:logback-dev.xml
|
|||||||
|
|
||||||
####### Database properties(Configure according to the the environment) #######
|
####### Database properties(Configure according to the the environment) #######
|
||||||
spring.datasource.core.driver-class-name=com.mysql.cj.jdbc.Driver
|
spring.datasource.core.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
spring.datasource.core.jdbc-url=jdbc:mysql://localhost:3306/powerjob-daily?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
spring.datasource.core.jdbc-url=jdbc:mysql://powerjob-mysql:3306/powerjob-daily?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||||
spring.datasource.core.username=root
|
spring.datasource.core.username=root
|
||||||
spring.datasource.core.password=No1Bug2Please3!
|
spring.datasource.core.password=No1Bug2Please3!
|
||||||
spring.datasource.core.maximum-pool-size=20
|
spring.datasource.core.maximum-pool-size=20
|
||||||
spring.datasource.core.minimum-idle=5
|
spring.datasource.core.minimum-idle=5
|
||||||
|
|
||||||
####### MongoDB properties(Non-core configuration properties) #######
|
####### Storage properties(Delete if not needed) #######
|
||||||
####### delete mongodb config to disable mongodb #######
|
|
||||||
#oms.storage.dfs.mongodb.uri=mongodb+srv://zqq:No1Bug2Please3!@cluster0.wie54.gcp.mongodb.net/powerjob_daily?retryWrites=true&w=majority
|
#oms.storage.dfs.mongodb.uri=mongodb+srv://zqq:No1Bug2Please3!@cluster0.wie54.gcp.mongodb.net/powerjob_daily?retryWrites=true&w=majority
|
||||||
|
oms.storage.dfs.mysql_series.driver=com.mysql.cj.jdbc.Driver
|
||||||
|
oms.storage.dfs.mysql_series.url=jdbc:mysql://localhost:3306/powerjob-daily?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||||
|
oms.storage.dfs.mysql_series.username=root
|
||||||
|
oms.storage.dfs.mysql_series.password=No1Bug2Please3!
|
||||||
|
oms.storage.dfs.mysql_series.auto_create_table=true
|
||||||
|
|
||||||
####### Email properties(Non-core configuration properties) #######
|
####### Email properties(Non-core configuration properties) #######
|
||||||
####### Delete the following code to disable the mail #######
|
####### Delete the following code to disable the mail #######
|
||||||
|
@ -9,8 +9,7 @@ spring.datasource.core.password=No1Bug2Please3!
|
|||||||
spring.datasource.core.maximum-pool-size=20
|
spring.datasource.core.maximum-pool-size=20
|
||||||
spring.datasource.core.minimum-idle=5
|
spring.datasource.core.minimum-idle=5
|
||||||
|
|
||||||
####### MongoDB properties(Non-core configuration properties) #######
|
####### Storage properties(Delete if not needed) #######
|
||||||
####### delete mongodb config to disable mongodb #######
|
|
||||||
oms.storage.dfs.mongodb.uri=mongodb://remotehost:27017/powerjob-pre
|
oms.storage.dfs.mongodb.uri=mongodb://remotehost:27017/powerjob-pre
|
||||||
|
|
||||||
####### Email properties(Non-core configuration properties) #######
|
####### Email properties(Non-core configuration properties) #######
|
||||||
|
@ -9,8 +9,7 @@ spring.datasource.core.password=No1Bug2Please3!
|
|||||||
spring.datasource.core.maximum-pool-size=20
|
spring.datasource.core.maximum-pool-size=20
|
||||||
spring.datasource.core.minimum-idle=5
|
spring.datasource.core.minimum-idle=5
|
||||||
|
|
||||||
####### MongoDB properties(Non-core configuration properties) #######
|
####### Storage properties(Delete if not needed) #######
|
||||||
####### delete mongodb config to disable mongodb #######
|
|
||||||
oms.storage.dfs.mongodb.uri=mongodb://localhost:27017/powerjob-product
|
oms.storage.dfs.mongodb.uri=mongodb://localhost:27017/powerjob-product
|
||||||
|
|
||||||
####### Email properties(Non-core configuration properties) #######
|
####### Email properties(Non-core configuration properties) #######
|
||||||
|
Loading…
x
Reference in New Issue
Block a user