mirror of https://gitee.com/maxjhandsome/pig
parent
1f68e688d6
commit
7fd0b46b4a
|
@ -1,20 +1,15 @@
|
|||
FROM moxm/java:1.8-full as builder
|
||||
WORKDIR /build
|
||||
ARG JAR_FILE=target/pig-auth.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai
|
||||
ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-auth
|
||||
|
||||
COPY --from=builder /build/dependencies/ ./
|
||||
COPY --from=builder /build/snapshot-dependencies/ ./
|
||||
COPY --from=builder /build/spring-boot-loader/ ./
|
||||
COPY --from=builder /build/application/ ./
|
||||
RUN mkdir -p /pig-auth
|
||||
|
||||
WORKDIR /pig-auth
|
||||
|
||||
ARG JAR_FILE=target/pig-auth.jar
|
||||
|
||||
COPY ${JAR_FILE} app.jar
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
|
||||
CMD sleep 60; java -jar app.jar $JAVA_OPTS
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
package com.pig4cloud.pig.common.security.component;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import com.pig4cloud.pig.common.core.constant.SecurityConstants;
|
||||
import com.pig4cloud.pig.common.security.datascope.UserDataScope;
|
||||
import com.pig4cloud.pig.common.security.service.PigUser;
|
||||
|
@ -26,12 +27,7 @@ import org.springframework.security.core.authority.AuthorityUtils;
|
|||
import org.springframework.security.oauth2.provider.token.UserAuthenticationConverter;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author lengleng
|
||||
|
@ -78,8 +74,10 @@ public class PigUserAuthenticationConverter implements UserAuthenticationConvert
|
|||
Object value = map.get(SecurityConstants.DETAILS_USER_DATA_SCOPE);
|
||||
if (value != null) {
|
||||
Map<String, ?> userDataScopeMap = (Map) value;
|
||||
userDataScope.setAllScope((boolean) userDataScopeMap.get("allScope"));
|
||||
userDataScope.setOnlySelf((boolean) userDataScopeMap.get("onlySelf"));
|
||||
userDataScope.setAllScope(MapUtil.getBool(userDataScopeMap, "allScope"));
|
||||
userDataScope.setOnlySelf(MapUtil.getBool(userDataScopeMap, "onlySelf"));
|
||||
|
||||
userDataScope.setScopeUserIds(new HashSet<>((List) userDataScopeMap.get("scopeUserIds")));
|
||||
userDataScope.setScopeUserIds(new HashSet<>((List) userDataScopeMap.get("scopeUserIds")));
|
||||
userDataScope.setScopeDeptIds(new HashSet<>((List) userDataScopeMap.get("scopeDeptIds")));
|
||||
}
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
FROM moxm/java:1.8-full as builder
|
||||
WORKDIR /build
|
||||
ARG JAR_FILE=target/pig-gateway.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-gateway
|
||||
|
||||
COPY --from=builder /build/dependencies/ ./
|
||||
COPY --from=builder /build/snapshot-dependencies/ ./
|
||||
COPY --from=builder /build/spring-boot-loader/ ./
|
||||
COPY --from=builder /build/application/ ./
|
||||
RUN mkdir -p /pig-gateway
|
||||
|
||||
WORKDIR /pig-gateway
|
||||
|
||||
ARG JAR_FILE=target/pig-gateway.jar
|
||||
|
||||
COPY ${JAR_FILE} app.jar
|
||||
|
||||
EXPOSE 9999
|
||||
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
|
||||
CMD sleep 60; java -jar app.jar $JAVA_OPTS
|
||||
|
|
|
@ -1,20 +1,15 @@
|
|||
FROM moxm/java:1.8-full as builder
|
||||
WORKDIR /build
|
||||
ARG JAR_FILE=target/pig-register.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-register
|
||||
RUN mkdir -p /pig-register
|
||||
|
||||
COPY --from=builder /build/dependencies/ ./
|
||||
COPY --from=builder /build/snapshot-dependencies/ ./
|
||||
COPY --from=builder /build/spring-boot-loader/ ./
|
||||
COPY --from=builder /build/application/ ./
|
||||
WORKDIR /pig-register
|
||||
|
||||
ARG JAR_FILE=target/pig-register.jar
|
||||
|
||||
COPY ${JAR_FILE} app.jar
|
||||
|
||||
EXPOSE 8848
|
||||
|
||||
CMD sleep 30; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
|
||||
CMD sleep 30; java -jar app.jar $JAVA_OPTS
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
FROM moxm/java:1.8-full as builder
|
||||
WORKDIR /build
|
||||
ARG JAR_FILE=target/pig-upms-biz.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-upms
|
||||
|
||||
COPY --from=builder /build/dependencies/ ./
|
||||
COPY --from=builder /build/snapshot-dependencies/ ./
|
||||
COPY --from=builder /build/spring-boot-loader/ ./
|
||||
COPY --from=builder /build/application/ ./
|
||||
RUN mkdir -p /pig-upms-biz
|
||||
|
||||
WORKDIR /pig-upms-biz
|
||||
|
||||
ARG JAR_FILE=target/pig-upms-biz.jar
|
||||
|
||||
COPY ${JAR_FILE} app.jar
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
|
||||
CMD sleep 60; java -jar app.jar $JAVA_OPTS
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
FROM moxm/java:1.8-full as builder
|
||||
WORKDIR /build
|
||||
ARG JAR_FILE=target/pig-codegen.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-codegen
|
||||
|
||||
COPY --from=builder /build/dependencies/ ./
|
||||
COPY --from=builder /build/snapshot-dependencies/ ./
|
||||
COPY --from=builder /build/spring-boot-loader/ ./
|
||||
COPY --from=builder /build/application/ ./
|
||||
RUN mkdir -p /pig-codegen
|
||||
|
||||
WORKDIR /pig-codegen
|
||||
|
||||
ARG JAR_FILE=target/pig-codegen.jar
|
||||
|
||||
COPY ${JAR_FILE} app.jar
|
||||
|
||||
EXPOSE 5002
|
||||
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
|
||||
CMD sleep 60; java -jar app.jar $JAVA_OPTS
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
FROM moxm/java:1.8-full as builder
|
||||
WORKDIR /build
|
||||
ARG JAR_FILE=target/pig-monitor.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-monitor
|
||||
|
||||
COPY --from=builder /build/dependencies/ ./
|
||||
COPY --from=builder /build/snapshot-dependencies/ ./
|
||||
COPY --from=builder /build/spring-boot-loader/ ./
|
||||
COPY --from=builder /build/application/ ./
|
||||
RUN mkdir -p /pig-monitor
|
||||
|
||||
WORKDIR /pig-monitor
|
||||
|
||||
ARG JAR_FILE=target/pig-monitor.jar
|
||||
|
||||
COPY ${JAR_FILE} app.jar
|
||||
|
||||
EXPOSE 5001
|
||||
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
|
||||
CMD sleep 60; java -jar app.jar $JAVA_OPTS
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
FROM moxm/java:1.8-full as builder
|
||||
WORKDIR /build
|
||||
ARG JAR_FILE=target/pig-sentinel-dashboard.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-sentinel-dashboard
|
||||
|
||||
COPY --from=builder /build/dependencies/ ./
|
||||
COPY --from=builder /build/snapshot-dependencies/ ./
|
||||
COPY --from=builder /build/spring-boot-loader/ ./
|
||||
COPY --from=builder /build/application/ ./
|
||||
RUN mkdir -p /pig-sentinel-dashboard
|
||||
|
||||
WORKDIR /pig-sentinel-dashboard
|
||||
|
||||
ARG JAR_FILE=target/pig-sentinel-dashboard.jar
|
||||
|
||||
COPY ${JAR_FILE} app.jar
|
||||
|
||||
EXPOSE 5003
|
||||
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
|
||||
CMD sleep 60; java -jar app.jar $JAVA_OPTS
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
FROM moxm/java:1.8-full as builder
|
||||
WORKDIR /build
|
||||
ARG JAR_FILE=target/pig-xxl-job-admin.jar
|
||||
COPY ${JAR_FILE} app.jar
|
||||
RUN java -Djarmode=layertools -jar app.jar extract && rm app.jar
|
||||
|
||||
FROM moxm/java:1.8-full
|
||||
LABEL maintainer="jclazz@outlook.com"
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
WORKDIR pig-xxl-job-admin
|
||||
|
||||
COPY --from=builder /build/dependencies/ ./
|
||||
COPY --from=builder /build/snapshot-dependencies/ ./
|
||||
COPY --from=builder /build/spring-boot-loader/ ./
|
||||
COPY --from=builder /build/application/ ./
|
||||
RUN mkdir -p /pig-xxl-job-admin
|
||||
|
||||
WORKDIR /pig-xxl-job-admin
|
||||
|
||||
ARG JAR_FILE=target/pig-xxl-job-admin.jar
|
||||
|
||||
COPY ${JAR_FILE} app.jar
|
||||
|
||||
EXPOSE 5004
|
||||
|
||||
CMD sleep 60; java $JAVA_OPTS org.springframework.boot.loader.JarLauncher
|
||||
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||
|
||||
CMD sleep 60; java -jar app.jar $JAVA_OPTS
|
||||
|
|
Loading…
Reference in New Issue