fix:更换数据库插件 解决无法nacos无法打包问题

This commit is contained in:
xiaoguangbin 2023-09-04 15:49:49 +08:00
parent 1a56e3e664
commit ad740f6aae
3 changed files with 37 additions and 16 deletions

View File

@ -6,6 +6,12 @@ services:
context: ./jeecg-cloud-nacos
ports:
- 8848:8848
environment:
- SERVER_PORT=8848
- DB_URL=jdbc:postgresql://182.92.183.230:5432/nacos
- DB_USER=temp
- DB_PASSWORD=123456
- DB_PLATFORM=postgresql
container_name: jeecg-boot-nacos
hostname: jeecg-boot-nacos
@ -20,16 +26,16 @@ services:
environment:
- TZ=Asia/Shanghai
jeecg-boot-demo:
depends_on:
- jeecg-boot-nacos
build:
context: ./jeecg-demo-cloud-start
container_name: jeecg-demo-start
hostname: jeecg-boot-demo
restart: on-failure
environment:
- TZ=Asia/Shanghai
# jeecg-boot-demo:
# depends_on:
# - jeecg-boot-nacos
# build:
# context: ./jeecg-demo-cloud-start
# container_name: jeecg-demo-start
# hostname: jeecg-boot-demo
# restart: on-failure
# environment:
# - TZ=Asia/Shanghai
jeecg-boot-gateway:
restart: on-failure

View File

@ -1,4 +1,5 @@
FROM anapsix/alpine-java:8_server-jre_unlimited
#FROM anapsix/alpine-java:8_server-jre_unlimited
FROM openjdk:8
MAINTAINER jeecgos@163.com
@ -10,6 +11,15 @@ WORKDIR /jeecg-cloud-nacos
EXPOSE 8848
ENV DB_URL=""
ENV DB_USER=""
ENV DB_PASSWORD=""
ENV DB_PLATFORM=""
ENV SERVER_PORT=""
EXPOSE $SERVER_PORT
ADD ./target/jeecg-cloud-nacos-3.5.1.jar ./
CMD sleep 1;java -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-nacos-3.5.1.jar
CMD sleep 5;java -DSERVER_PORT=$SERVER_PORT -DDB_URL=$DB_URL -DDB_USER=$DB_USER -DDB_PASSWORD=$DB_PASSWORD -DDB_PLATFORM=$DB_PLATFORM -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar jeecg-cloud-nacos-3.5.1.jar

View File

@ -74,10 +74,15 @@
<version>42.2.25</version>
</dependency>
<!-- pgsql 数据源插件,nacos2.1之后才支持 -->
<!-- <dependency>-->
<!-- <groupId>com.alibaba.nacos</groupId>-->
<!-- <artifactId>nacos-postgresql-datasource-plugin-ext</artifactId>-->
<!-- <version>1.0.0-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency>
<groupId>com.alibaba.nacos</groupId>
<artifactId>nacos-postgresql-datasource-plugin-ext</artifactId>
<version>1.0.0-SNAPSHOT</version>
<groupId>com.pig4cloud.plugin</groupId>
<artifactId>nacos-datasource-plugin-pg</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>