Compare commits

...

3 Commits

Author SHA1 Message Date
335aa0daee Merge pull request 'xinwei' (#43) from xinwei into master
All checks were successful
continuous-integration/drone Build is passing
Reviewed-on: #43
2024-08-26 13:09:32 +08:00
8141eed0dd Merge branch 'master' of http://101.43.112.107:3000/root/ludu-cloud into xinwei 2024-08-26 13:08:24 +08:00
6d08c0383a 构建修改 2024-08-26 13:07:51 +08:00
9 changed files with 37 additions and 10 deletions

View File

@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
echo '----build image----'
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
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}

View File

@ -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'
echo '----stop container----'
@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
echo '----build image----'
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
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}

View File

@ -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;
}
}

View File

@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
echo '----build image----'
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
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}

View File

@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
echo '----build image----'
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
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}

View File

@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
echo '----build image----'
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
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}

View File

@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
echo '----build image----'
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
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}

View File

@ -66,7 +66,7 @@ spring:
username: root
password: 123456
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
password: xpower1234

View File

@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
echo '----build image----'
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
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}