Merge pull request 'xinwei' (#43) from xinwei into master
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
Reviewed-on: #43
This commit is contained in:
commit
335aa0daee
@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
|
|||||||
echo '----build image----'
|
echo '----build image----'
|
||||||
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
||||||
echo '----start container----'
|
echo '----start container----'
|
||||||
docker run -d -p 48084:9090 --name ${app_name} ${app_name}:${app_version}
|
docker run -d -p 48084:9090 --name ${app_name} --memory 512m ${app_name}:${app_version}
|
@ -1,6 +1,6 @@
|
|||||||
app_name='ludu-module-datacenter'
|
app_name='ludu-module-datacenter2'
|
||||||
# 定义应用版本
|
# 定义应用版本
|
||||||
app_version='1.0.0'
|
app_version='2.0.0'
|
||||||
# 定义应用环境
|
# 定义应用环境
|
||||||
#profile_active='prod'
|
#profile_active='prod'
|
||||||
echo '----stop container----'
|
echo '----stop container----'
|
||||||
@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
|
|||||||
echo '----build image----'
|
echo '----build image----'
|
||||||
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
||||||
echo '----start container----'
|
echo '----start container----'
|
||||||
docker run -d -p 48092:48092 --name ${app_name} ${app_name}:${app_version}
|
docker run -d -p 9091:48092 --name ${app_name} --memory 800m ${app_name}:${app_version}
|
@ -0,0 +1,27 @@
|
|||||||
|
package cn.iocoder.yudao.module.datacenter.framework.nacos.config;
|
||||||
|
|
||||||
|
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.context.annotation.Primary;
|
||||||
|
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class BeanInit {
|
||||||
|
/**
|
||||||
|
* 用于改变程序自动获取的本机ip
|
||||||
|
*/
|
||||||
|
@Bean
|
||||||
|
@Primary
|
||||||
|
public NacosDiscoveryProperties nacosProperties() throws UnknownHostException {
|
||||||
|
NacosDiscoveryProperties nacosDiscoveryProperties = new NacosDiscoveryProperties();
|
||||||
|
// 直接指定域名
|
||||||
|
String customIp = "120.46.37.243"; // 替换为你的域名
|
||||||
|
int customPort = 9091; // 替换为你的端口
|
||||||
|
nacosDiscoveryProperties.setIp(customIp );
|
||||||
|
nacosDiscoveryProperties.setPort(customPort);
|
||||||
|
return nacosDiscoveryProperties;
|
||||||
|
}
|
||||||
|
}
|
@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
|
|||||||
echo '----build image----'
|
echo '----build image----'
|
||||||
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
||||||
echo '----start container----'
|
echo '----start container----'
|
||||||
docker run -d -p 48090:48090 --name ${app_name} ${app_name}:${app_version}
|
docker run -d -p 48090:48090 --name ${app_name} --memory 600m ${app_name}:${app_version}
|
@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
|
|||||||
echo '----build image----'
|
echo '----build image----'
|
||||||
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
||||||
echo '----start container----'
|
echo '----start container----'
|
||||||
docker run -d -p 48088:48088 --name ${app_name} ${app_name}:${app_version}
|
docker run -d -p 48088:48088 --name ${app_name} --memory 600m ${app_name}:${app_version}
|
@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
|
|||||||
echo '----build image----'
|
echo '----build image----'
|
||||||
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
||||||
echo '----start container----'
|
echo '----start container----'
|
||||||
docker run -d -p 48083:48080 --name ${app_name} ${app_name}:${app_version}
|
docker run -d -p 48083:48080 --name ${app_name} --memory 512m ${app_name}:${app_version}
|
@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
|
|||||||
echo '----build image----'
|
echo '----build image----'
|
||||||
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
||||||
echo '----start container----'
|
echo '----start container----'
|
||||||
docker run -d -p 48082:48082 --name ${app_name} ${app_name}:${app_version}
|
docker run -d -p 48082:48082 --name ${app_name} --memory 700m ${app_name}:${app_version}
|
@ -66,7 +66,7 @@ spring:
|
|||||||
username: root
|
username: root
|
||||||
password: 123456
|
password: 123456
|
||||||
ticketing:
|
ticketing:
|
||||||
url: jdbc:mysql://120.46.37.243:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: xpower1234
|
password: xpower1234
|
||||||
|
|
||||||
|
@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
|
|||||||
echo '----build image----'
|
echo '----build image----'
|
||||||
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
||||||
echo '----start container----'
|
echo '----start container----'
|
||||||
docker run -d -p 48081:48081 --name ${app_name} ${app_name}:${app_version}
|
docker run -d -p 48081:48081 --name ${app_name} --memory 700m ${app_name}:${app_version}
|
Loading…
Reference in New Issue
Block a user