From f42421ca9edd11093d97eab8d7e39961f371d2a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=81=E5=AE=A2=E5=BC=80=E6=BA=90?= Date: Wed, 8 Feb 2023 08:38:19 +0000 Subject: [PATCH] =?UTF-8?q?:zap:=20=E6=94=AF=E6=8C=81=20docker-compose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 62 +++++++++++++++++++ eiam-console/source.list | 10 +++ .../src/main/resources/application.yml | 26 ++++---- .../src/main/resources/application.yml | 26 ++++---- .../src/main/resources/application.yml | 26 ++++---- .../src/main/resources/application.yml | 20 +++--- 6 files changed, 121 insertions(+), 49 deletions(-) create mode 100644 docker-compose.yml create mode 100644 eiam-console/source.list diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..4e4a0674 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,62 @@ +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 diff --git a/eiam-console/source.list b/eiam-console/source.list new file mode 100644 index 00000000..3f18a0f9 --- /dev/null +++ b/eiam-console/source.list @@ -0,0 +1,10 @@ +deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse \ No newline at end of file diff --git a/eiam-console/src/main/resources/application.yml b/eiam-console/src/main/resources/application.yml index 91d7e1d1..38b94c96 100644 --- a/eiam-console/src/main/resources/application.yml +++ b/eiam-console/src/main/resources/application.yml @@ -54,9 +54,9 @@ spring: datasource: type: com.zaxxer.hikari.HikariDataSource driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/eiam_develop?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true - username: 'eiam' - password: '' + url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/eiam_develop?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true + username: ${MYSQL_USER:'eiam'} + password: ${MYSQL_PASSWORD:''} hikari: auto-commit: true connection-test-query: SELECT 1 @@ -68,9 +68,9 @@ spring: pool-name: eiam #reids redis: - host: localhost - port: 6379 - password: '' + host: ${REDIS_HOST:localhost} + port: ${REDIS_PORT:6379} + password: ${REDIS_PASSWORD:''} database: 9 lettuce: pool: @@ -82,9 +82,9 @@ spring: timeout: 5000ms #elasticsearch elasticsearch: - uris: "http://localhost:9200" - username: "elastic" - password: "" + uris: "http://${ES_HOST:localhost}:${ES_PORT:9200}" + username: ${ES_USER:"elastic"} + password: ${ES_PASSWORD:""} socket-timeout: 30000s connection-timeout: 10000s data: @@ -156,7 +156,7 @@ springdoc: #TopIAM topiam: server: - console-public-base-url: - portal-public-base-url: - openapi-public-base-url: - synchronizer-public-base-url: \ No newline at end of file + console-public-base-url: https://localhost:1898 + portal-public-base-url: https://localhost:1989 + openapi-public-base-url: https://localhost:1988 + synchronizer-public-base-url: https://localhost:1986 \ No newline at end of file diff --git a/eiam-openapi/src/main/resources/application.yml b/eiam-openapi/src/main/resources/application.yml index 7b167f5b..0c633848 100644 --- a/eiam-openapi/src/main/resources/application.yml +++ b/eiam-openapi/src/main/resources/application.yml @@ -54,9 +54,9 @@ spring: datasource: type: com.zaxxer.hikari.HikariDataSource driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/eiam_develop?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true - username: 'eiam' - password: '' + url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/eiam_develop?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true + username: ${MYSQL_USER:'eiam'} + password: ${MYSQL_PASSWORD:''} hikari: auto-commit: true connection-test-query: SELECT 1 @@ -68,9 +68,9 @@ spring: pool-name: eiam #reids redis: - host: localhost - port: 6379 - password: '' + host: ${REDIS_HOST:localhost} + port: ${REDIS_PORT:6379} + password: ${REDIS_PASSWORD:''} database: 9 lettuce: pool: @@ -82,9 +82,9 @@ spring: timeout: 5000ms #elasticsearch elasticsearch: - uris: "http://localhost:9200" - username: "elastic" - password: "" + uris: "http://${ES_HOST:localhost}:${ES_PORT:9200}" + username: ${ES_USER:"elastic"} + password: ${ES_PASSWORD:""} socket-timeout: 30000s connection-timeout: 10000s data: @@ -156,7 +156,7 @@ springdoc: #TopIAM topiam: server: - console-public-base-url: - portal-public-base-url: - openapi-public-base-url: - synchronizer-public-base-url: \ No newline at end of file + console-public-base-url: https://localhost:1898 + portal-public-base-url: https://localhost:1989 + openapi-public-base-url: https://localhost:1988 + synchronizer-public-base-url: https://localhost:1986 \ No newline at end of file diff --git a/eiam-portal/src/main/resources/application.yml b/eiam-portal/src/main/resources/application.yml index 5a9566e6..8abc8ad4 100644 --- a/eiam-portal/src/main/resources/application.yml +++ b/eiam-portal/src/main/resources/application.yml @@ -54,9 +54,9 @@ spring: datasource: type: com.zaxxer.hikari.HikariDataSource driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/eiam_develop?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true - username: 'eiam' - password: '' + url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/eiam_develop?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true + username: ${MYSQL_USER:'eiam'} + password: ${MYSQL_PASSWORD:''} hikari: auto-commit: true connection-test-query: SELECT 1 @@ -68,9 +68,9 @@ spring: pool-name: eiam #reids redis: - host: localhost - port: 6379 - password: '' + host: ${REDIS_HOST:localhost} + port: ${REDIS_PORT:6379} + password: ${REDIS_PASSWORD:''} database: 9 lettuce: pool: @@ -82,9 +82,9 @@ spring: timeout: 5000ms #elasticsearch elasticsearch: - uris: "http://localhost:9200" - username: "elastic" - password: "" + uris: "http://${ES_HOST:localhost}:${ES_PORT:9200}" + username: ${ES_USER:"elastic"} + password: ${ES_PASSWORD:""} socket-timeout: 30000s connection-timeout: 10000s data: @@ -158,7 +158,7 @@ topiam: demo: open: true server: - console-public-base-url: https://eiam-console.topiam.cn - portal-public-base-url: https://eiam-portal.topiam.cn:8080 - openapi-public-base-url: https://eiam-openapi.topiam.cn - synchronizer-public-base-url: https://eia2m-synchronizer.topiam.cn \ No newline at end of file + console-public-base-url: https://localhost:1898 + portal-public-base-url: https://localhost:1989 + openapi-public-base-url: https://localhost:1988 + synchronizer-public-base-url: https://localhost:1986 \ No newline at end of file diff --git a/eiam-synchronizer/src/main/resources/application.yml b/eiam-synchronizer/src/main/resources/application.yml index cd08f458..a9950f8e 100644 --- a/eiam-synchronizer/src/main/resources/application.yml +++ b/eiam-synchronizer/src/main/resources/application.yml @@ -54,9 +54,9 @@ spring: datasource: type: com.zaxxer.hikari.HikariDataSource driver-class-name: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/eiam_develop?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true - username: 'eiam' - password: '' + url: jdbc:mysql://${MYSQL_HOST:localhost}:${MYSQL_PORT:3306}/eiam_develop?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true + username: ${MYSQL_USER:'eiam'} + password: ${MYSQL_PASSWORD:''} hikari: auto-commit: true connection-test-query: SELECT 1 @@ -68,9 +68,9 @@ spring: pool-name: eiam #reids redis: - host: localhost - port: 6379 - password: '' + host: ${REDIS_HOST:localhost} + port: ${REDIS_PORT:6379} + password: ${REDIS_PASSWORD:''} database: 9 lettuce: pool: @@ -156,7 +156,7 @@ springdoc: #TopIAM topiam: server: - console-public-base-url: - portal-public-base-url: - openapi-public-base-url: - synchronizer-public-base-url: \ No newline at end of file + console-public-base-url: https://localhost:1898 + portal-public-base-url: https://localhost:1989 + openapi-public-base-url: https://localhost:1988 + synchronizer-public-base-url: https://localhost:1986 \ No newline at end of file