forked from Gitlink/soft_bot
config for docker
This commit is contained in:
parent
3d2e22d0f3
commit
a89bb8ecb0
|
@ -0,0 +1,4 @@
|
|||
FROM openjdk:8-jdk
|
||||
ADD target/softbot.jar /data/softbot.jar
|
||||
WORKDIR /data
|
||||
ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS softbot.jar --spring.config.location=/data/config/softbot_application.yml"]
|
|
@ -0,0 +1,72 @@
|
|||
server:
|
||||
port: 8080
|
||||
es-url:
|
||||
127.0.0.1:9200
|
||||
spring:
|
||||
datasource:
|
||||
username: root
|
||||
password: 123456 #tonglin0711
|
||||
url: jdbc:mysql://localhost:3306/testforgeplus?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
dbcp2:
|
||||
test-on-borrow: false
|
||||
test-while-idle: true
|
||||
time-between-eviction-runs-millis: 3600000
|
||||
|
||||
elasticsearch:
|
||||
rest:
|
||||
uris: http://127.0.0.1:9200
|
||||
devtools:
|
||||
restart:
|
||||
|
||||
enabled: true
|
||||
|
||||
additional-paths: src/main/java
|
||||
|
||||
poll-interval: 3000
|
||||
quiet-period: 1000
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
mvc:
|
||||
view:
|
||||
prefix: /WEB-INF/jsp/
|
||||
suffix: .jsp
|
||||
thymeleaf:
|
||||
prefix: classpath:/templates/
|
||||
suffix: .html
|
||||
encoding: UTF-8
|
||||
redis:
|
||||
database: 0
|
||||
host: 101.35.140.79
|
||||
port: 6379
|
||||
# password:
|
||||
# 连接超时时间
|
||||
timeout: 10000
|
||||
password: 123456
|
||||
|
||||
mybatis-plus:
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
|
||||
|
||||
mybatis:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
type-aliases-package: com.gitlink.softbot.entity
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
|
||||
#showSql
|
||||
logging:
|
||||
level:
|
||||
com:
|
||||
example:
|
||||
mapper : debug
|
||||
elasticsearch:
|
||||
url: localhost:9200
|
||||
|
||||
gitlink:
|
||||
url: https://testforgeplus.trustie.net
|
||||
token: eyJraWQiOiJUaEVSLVl3Ukg4TWYwOHM0UnJLUDYzXzZLWmVET2NZckZXcmdzN2VUVWdrIiwiYWxnIjoiSFM1MTIifQ.eyJpc3MiOiJHaXRMaW5rIiwiaWF0IjoxNjc1NzYyMDkwLCJqdGkiOiI0MzA1ZDUwZC01ZGRkLTQ0MzUtODMyNS1iZDczYmVhMWMxYjciLCJ1c2VyIjp7ImlkIjpudWxsLCJsb2dpbiI6bnVsbCwibWFpbCI6bnVsbH19.hpHCJeU4Jyz-DM2NBUdB-tQW_E0-tu9H3LoGhsJ7kPHkSsdXJCII0jxhyPb9gwDsgd8SnlRZF8tZDDjnZSoztQ
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
version: '3'
|
||||
services:
|
||||
gitlink-softbot:
|
||||
container_name: softbot
|
||||
image: softbot:1.0.0
|
||||
build:
|
||||
context: ../
|
||||
dockerfile: docker/Dockerfile
|
||||
volumes:
|
||||
- ./config/softbot_application.yml:/data/config/softbot_application.yml
|
||||
ports:
|
||||
- "8069:8081"
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 800M
|
||||
restart: always
|
|
@ -0,0 +1 @@
|
|||
mvn -f ../pom.xml clean package -DskipTests && cp ../src/main/resources/application.yml ./config/softbot_application.yml && docker-compose -f docker-compose.yml up -d --build --force-recreate
|
2
pom.xml
2
pom.xml
|
@ -158,7 +158,7 @@
|
|||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>clothing-manage</finalName>
|
||||
<finalName>softbot</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
//package com.gitlink.softbot.config;
|
||||
//
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.web.cors.CorsConfiguration;
|
||||
//import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
//import org.springframework.web.filter.CorsFilter;
|
||||
//
|
||||
///**
|
||||
// * ClassName CrossConfig
|
||||
// *
|
||||
// * @author ZengWei
|
||||
// * Date 2021/7/15
|
||||
// */
|
||||
//
|
||||
//@Configuration
|
||||
//public class CrossConfig {
|
||||
// private CorsConfiguration buildConfig() {
|
||||
// CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||
// corsConfiguration.addAllowedOrigin("*");
|
||||
// corsConfiguration.addAllowedHeader("*");
|
||||
// corsConfiguration.addAllowedMethod("*");
|
||||
// corsConfiguration.setMaxAge(3600L); // 预检请求的有效期,单位为秒。
|
||||
// corsConfiguration.setAllowCredentials(true);// 是否支持安全证书(必需参数)
|
||||
// return corsConfiguration;
|
||||
// }
|
||||
//
|
||||
// @Bean
|
||||
// public CorsFilter corsFilter() {
|
||||
// UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
// source.registerCorsConfiguration("/**", buildConfig());
|
||||
// return new CorsFilter(source);
|
||||
// }
|
||||
//}
|
Loading…
Reference in New Issue