Browse Source

优化docker配置

test
smallchill 6 years ago
parent
commit
384ca5000f
  1. 6
      blade-ops/blade-flow-design/Dockerfile
  2. 6
      blade-ops/blade-flow/Dockerfile
  3. 20
      blade-ops/blade-flow/pom.xml
  4. 20
      blade-ops/blade-log/pom.xml
  5. 2
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java
  6. 16
      script/docker/docker-compose.yml

6
blade-ops/blade-flow-design/Dockerfile

@ -2,11 +2,11 @@ FROM anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER smallchill@163.com
RUN mkdir -p /blade/admin
RUN mkdir -p /blade/flowdesign
WORKDIR /blade/admin
WORKDIR /blade/flowdesign
EXPOSE 7002
EXPOSE 9999
ADD ./target/blade-flow-design.jar ./app.jar

6
blade-ops/blade-flow/Dockerfile

@ -2,11 +2,11 @@ FROM anapsix/alpine-java:8_server-jre_unlimited
MAINTAINER smallchill@163.com
RUN mkdir -p /blade/admin
RUN mkdir -p /blade/flow
WORKDIR /blade/admin
WORKDIR /blade/flow
EXPOSE 7002
EXPOSE 8008
ADD ./target/blade-flow.jar ./app.jar

20
blade-ops/blade-flow/pom.xml

@ -67,6 +67,26 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.plugin.version}</version>
<configuration>
<imageName>${docker.registry.url}/blade/${project.artifactId}:${project.version}</imageName>
<dockerDirectory>${project.basedir}</dockerDirectory>
<dockerHost>${docker.registry.host}</dockerHost>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<registryUrl>${docker.registry.url}</registryUrl>
<serverId>${docker.registry.url}</serverId>
<pushImage>true</pushImage>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>

20
blade-ops/blade-log/pom.xml

@ -35,6 +35,26 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.plugin.version}</version>
<configuration>
<imageName>${docker.registry.url}/blade/${project.artifactId}:${project.version}</imageName>
<dockerDirectory>${project.basedir}</dockerDirectory>
<dockerHost>${docker.registry.host}</dockerHost>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<registryUrl>${docker.registry.url}</registryUrl>
<serverId>${docker.registry.url}</serverId>
<pushImage>true</pushImage>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>

2
blade-service/blade-system/src/main/java/org/springblade/system/service/impl/RoleServiceImpl.java

@ -59,7 +59,7 @@ public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements IR
public List<RoleVO> tree(String tenantCode) {
String userRole = SecureUtil.getUserRole();
String excludeRole = null;
if (!CollectionUtil.contains(Func.toStrArray(userRole), RoleConstant.ADMINISTRATOR)) {
if (!CollectionUtil.contains(Func.toStrArray(userRole), RoleConstant.ADMINISTRATOR) && !CollectionUtil.contains(Func.toStrArray(userRole), RoleConstant.ADMINISTRATOR)) {
excludeRole = RoleConstant.ADMINISTRATOR;
}
return ForestNodeMerger.merge(baseMapper.tree(tenantCode, excludeRole));

16
script/docker/docker-compose.yml

@ -131,6 +131,22 @@ services:
networks:
- blade_net
blade-flow:
image: "${REGISTER}/blade/blade-flow:${TAG}"
privileged: true
restart: always
networks:
- blade_net
blade-flow-design:
image: "${REGISTER}/blade/blade-flow-design:${TAG}"
privileged: true
restart: always
ports:
- 9999:9999
networks:
- blade_net
networks:
blade_net:
driver: bridge

Loading…
Cancel
Save