mirror of https://gitee.com/topiam/eiam
feature:添加单机版本docker-comspoe.yml
parent
632df3bf19
commit
8820b59297
|
@ -0,0 +1,66 @@
|
||||||
|
version: '3'
|
||||||
|
x-public-common: &public-config
|
||||||
|
environment:
|
||||||
|
MYSQL_HOST: 192.168.56.107 # 配置数据库的信息
|
||||||
|
MYSQL_USER: root
|
||||||
|
MYSQL_PASSWORD: admin
|
||||||
|
ES_HOST: 192.168.56.107 # 配置ES信息
|
||||||
|
REDIS_HOST: 192.168.56.107 # 配置REDIS的信息
|
||||||
|
REDIS_PASSWORD: 12345678
|
||||||
|
CONSOLE_PUBLIC_BASE_URL: http://192.168.56.104:1898
|
||||||
|
PORTAL_PUBLIC_BASE_URL: https://192.168.56.104:1989
|
||||||
|
OPENAPI_PUBLIC_BASE_URL: http://192.168.56.104:1988
|
||||||
|
SYNCHRONIZER_PUBLIC_BASE_URL: http://192.168.56.104:1986
|
||||||
|
services:
|
||||||
|
eiam-console:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: docker/eiam-console/Dockerfile
|
||||||
|
<<: *public-config
|
||||||
|
container_name: eiam-console
|
||||||
|
ports:
|
||||||
|
- 1898:1898
|
||||||
|
image: eiam-console
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- eiam-network
|
||||||
|
eiam-openapi:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: docker/eiam-openapi/Dockerfile
|
||||||
|
<<: *public-config
|
||||||
|
container_name: eiam-openapi
|
||||||
|
image: eiam-openapi
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 1988:1988
|
||||||
|
networks:
|
||||||
|
- eiam-network
|
||||||
|
eiam-portal:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: docker/eiam-portal/Dockerfile
|
||||||
|
<<: *public-config
|
||||||
|
container_name: eiam-portal
|
||||||
|
image: eiam-portal
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 1989:1989
|
||||||
|
networks:
|
||||||
|
- eiam-network
|
||||||
|
eiam-synchronizer:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: docker/eiam-synchronizer/Dockerfile
|
||||||
|
<<: *public-config
|
||||||
|
container_name: eiam-synchronizer
|
||||||
|
image: eiam-synchronizer
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- 1986:1986
|
||||||
|
networks:
|
||||||
|
- eiam-network
|
||||||
|
networks:
|
||||||
|
eiam-network:
|
||||||
|
external: false
|
||||||
|
name: eiam-network
|
|
@ -1,62 +0,0 @@
|
||||||
version: '3'
|
|
||||||
services:
|
|
||||||
eiam-console:
|
|
||||||
build:
|
|
||||||
context: ./eiam-console/
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
environment:
|
|
||||||
MYSQL_HOST: 192.168.56.107
|
|
||||||
MYSQL_USER: root
|
|
||||||
MYSQL_PASSWORD: admin
|
|
||||||
ES_HOST: 192.168.56.107
|
|
||||||
REDIS_HOST: 192.168.56.107
|
|
||||||
REDIS_PASSWORD: 12345678
|
|
||||||
ports:
|
|
||||||
- 1898:1898
|
|
||||||
image: eiam-console
|
|
||||||
restart: always
|
|
||||||
eiam-openapi:
|
|
||||||
build:
|
|
||||||
context: ./eiam-openapi/
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
environment:
|
|
||||||
MYSQL_HOST: 192.168.56.107
|
|
||||||
MYSQL_USER: root
|
|
||||||
MYSQL_PASSWORD: admin
|
|
||||||
ES_HOST: 192.168.56.107
|
|
||||||
REDIS_HOST: 192.168.56.107
|
|
||||||
REDIS_PASSWORD: 12345678
|
|
||||||
image: eiam-openapi
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 1988:1988
|
|
||||||
eiam-portal:
|
|
||||||
build:
|
|
||||||
context: ./eiam-portal/
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
environment:
|
|
||||||
MYSQL_HOST: 192.168.56.107
|
|
||||||
MYSQL_USER: root
|
|
||||||
MYSQL_PASSWORD: admin
|
|
||||||
ES_HOST: 192.168.56.107
|
|
||||||
REDIS_HOST: 192.168.56.107
|
|
||||||
REDIS_PASSWORD: 12345678
|
|
||||||
image: eiam-portal
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 1989:1989
|
|
||||||
eiam-synchronizer:
|
|
||||||
build:
|
|
||||||
context: ./eiam-synchronizer/
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
environment:
|
|
||||||
MYSQL_HOST: 192.168.56.107
|
|
||||||
MYSQL_USER: root
|
|
||||||
MYSQL_PASSWORD: admin
|
|
||||||
ES_HOST: 192.168.56.107
|
|
||||||
REDIS_HOST: 192.168.56.107
|
|
||||||
REDIS_PASSWORD: 12345678
|
|
||||||
image: eiam-synchronizer
|
|
||||||
restart: always
|
|
||||||
ports:
|
|
||||||
- 1986:1986
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
#
|
||||||
|
# TopIAM Employee - Employee Identity and Access Management Program
|
||||||
|
# Copyright © 2020-2023 TopIAM (support@topiam.cn)
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM azul/zulu-openjdk:17-jre as build
|
||||||
|
WORKDIR /workspace/app
|
||||||
|
ARG MODULE_NAME=eiam-console
|
||||||
|
ARG JAR_FILE=${MODULE_NAME}/target/topiam-employee-console-*.jar
|
||||||
|
COPY ${JAR_FILE} target/application.jar
|
||||||
|
RUN java -Djarmode=layertools -jar target/application.jar extract --destination target/extracted
|
||||||
|
|
||||||
|
FROM azul/zulu-openjdk:17-jre
|
||||||
|
|
||||||
|
ARG EXTRACTED=/workspace/app/target/extracted
|
||||||
|
WORKDIR topiam
|
||||||
|
ARG ENTRYPOINT_FILE=docker/entrypoint.sh
|
||||||
|
COPY ${ENTRYPOINT_FILE} /
|
||||||
|
COPY --from=build ${EXTRACTED}/dependencies/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/spring-boot-loader/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/snapshot-dependencies/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/application/ ./
|
||||||
|
|
||||||
|
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
RUN sed -i 's/archive.ubuntu.com/cn.archive.ubuntu.com/g' /etc/apt/sources.list \
|
||||||
|
&& apt-get update \
|
||||||
|
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
|
||||||
|
&& apt-get install tzdata \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& apt-get autoclean \
|
||||||
|
&& apt-get autoremove \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||||
|
|
||||||
|
EXPOSE 1898
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
@ -0,0 +1,50 @@
|
||||||
|
#
|
||||||
|
# TopIAM Employee - Employee Identity and Access Management Program
|
||||||
|
# Copyright © 2020-2023 TopIAM (support@topiam.cn)
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM azul/zulu-openjdk:17-jre as build
|
||||||
|
WORKDIR /workspace/app
|
||||||
|
ARG MODULE_NAME=eiam-openapi
|
||||||
|
ARG JAR_FILE=${MODULE_NAME}/target/topiam-employee-openapi-*.jar
|
||||||
|
COPY ${JAR_FILE} target/application.jar
|
||||||
|
RUN java -Djarmode=layertools -jar target/application.jar extract --destination target/extracted
|
||||||
|
|
||||||
|
FROM azul/zulu-openjdk:17-jre
|
||||||
|
|
||||||
|
ARG EXTRACTED=/workspace/app/target/extracted
|
||||||
|
WORKDIR topiam
|
||||||
|
ARG ENTRYPOINT_FILE=docker/entrypoint.sh
|
||||||
|
COPY ${ENTRYPOINT_FILE} /
|
||||||
|
COPY --from=build ${EXTRACTED}/dependencies/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/spring-boot-loader/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/snapshot-dependencies/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/application/ ./
|
||||||
|
|
||||||
|
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
RUN sed -i 's/archive.ubuntu.com/cn.archive.ubuntu.com/g' /etc/apt/sources.list \
|
||||||
|
&& apt-get update \
|
||||||
|
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
|
||||||
|
&& apt-get install tzdata \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& apt-get autoclean \
|
||||||
|
&& apt-get autoremove \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||||
|
|
||||||
|
EXPOSE 1988
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
@ -0,0 +1,51 @@
|
||||||
|
#
|
||||||
|
# TopIAM Employee - Employee Identity and Access Management Program
|
||||||
|
# Copyright © 2020-2023 TopIAM (support@topiam.cn)
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM azul/zulu-openjdk:17-jre as build
|
||||||
|
WORKDIR /workspace/app
|
||||||
|
ARG MODULE_NAME=eiam-portal
|
||||||
|
ARG JAR_FILE=${MODULE_NAME}/target/topiam-employee-portal-*.jar
|
||||||
|
COPY ${JAR_FILE} target/application.jar
|
||||||
|
RUN java -Djarmode=layertools -jar target/application.jar extract --destination target/extracted
|
||||||
|
|
||||||
|
FROM azul/zulu-openjdk:17-jre
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ARG EXTRACTED=/workspace/app/target/extracted
|
||||||
|
WORKDIR topiam
|
||||||
|
ARG ENTRYPOINT_FILE=docker/entrypoint.sh
|
||||||
|
COPY ${ENTRYPOINT_FILE} /
|
||||||
|
COPY --from=build ${EXTRACTED}/dependencies/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/spring-boot-loader/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/snapshot-dependencies/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/application/ ./
|
||||||
|
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
RUN sed -i 's/archive.ubuntu.com/cn.archive.ubuntu.com/g' /etc/apt/sources.list \
|
||||||
|
&& apt-get update \
|
||||||
|
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
|
||||||
|
&& apt-get install tzdata \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& apt-get autoclean \
|
||||||
|
&& apt-get autoremove \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||||
|
|
||||||
|
EXPOSE 1989
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
@ -0,0 +1,49 @@
|
||||||
|
#
|
||||||
|
# TopIAM Employee - Employee Identity and Access Management Program
|
||||||
|
# Copyright © 2020-2023 TopIAM (support@topiam.cn)
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
FROM azul/zulu-openjdk:17-jre as build
|
||||||
|
WORKDIR /workspace/app
|
||||||
|
ARG MODULE_NAME=eiam-synchronizer
|
||||||
|
ARG JAR_FILE=${MODULE_NAME}/target/topiam-employee-synchronizer-*.jar
|
||||||
|
COPY ${JAR_FILE} target/application.jar
|
||||||
|
RUN java -Djarmode=layertools -jar target/application.jar extract --destination target/extracted
|
||||||
|
|
||||||
|
FROM azul/zulu-openjdk:17-jre
|
||||||
|
ARG ENTRYPOINT_FILE=docker/entrypoint.sh
|
||||||
|
COPY ${ENTRYPOINT_FILE} /
|
||||||
|
ARG EXTRACTED=/workspace/app/target/extracted
|
||||||
|
WORKDIR topiam
|
||||||
|
COPY --from=build ${EXTRACTED}/dependencies/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/spring-boot-loader/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/snapshot-dependencies/ ./
|
||||||
|
COPY --from=build ${EXTRACTED}/application/ ./
|
||||||
|
|
||||||
|
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
RUN sed -i 's/archive.ubuntu.com/cn.archive.ubuntu.com/g' /etc/apt/sources.list \
|
||||||
|
&& apt-get update \
|
||||||
|
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
|
||||||
|
&& apt-get install tzdata \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& apt-get autoclean \
|
||||||
|
&& apt-get autoremove \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||||
|
|
||||||
|
EXPOSE 1986
|
||||||
|
|
||||||
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
@ -0,0 +1,23 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# TopIAM Employee - Employee Identity and Access Management Program
|
||||||
|
# Copyright © 2020-2023 TopIAM (support@topiam.cn)
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Affero General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Affero General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Affero General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
java -XX:TieredStopAtLevel=1 \
|
||||||
|
-Djava.security.egd=file:/dev/./urandom \
|
||||||
|
-Dspring.main.lazy-initialization=false \
|
||||||
|
org.springframework.boot.loader.JarLauncher
|
|
@ -156,7 +156,7 @@ springdoc:
|
||||||
#TopIAM
|
#TopIAM
|
||||||
topiam:
|
topiam:
|
||||||
server:
|
server:
|
||||||
console-public-base-url: https://localhost:1898
|
console-public-base-url: ${CONSOLE_PUBLIC_BASE_URL:https://localhost:1898}
|
||||||
portal-public-base-url: https://localhost:1989
|
portal-public-base-url: ${PORTAL_PUBLIC_BASE_URL:https://localhost:1989}
|
||||||
openapi-public-base-url: https://localhost:1988
|
openapi-public-base-url: ${OPENAPI_PUBLIC_BASE_URL:https://localhost:1988}
|
||||||
synchronizer-public-base-url: https://localhost:1986
|
synchronizer-public-base-url: ${SYNCHRONIZER_PUBLIC_BASE_URL:https://localhost:1986}
|
Loading…
Reference in New Issue