commit
92efe63919
|
@ -14,7 +14,6 @@ services:
|
|||
volumes:
|
||||
- mysql:/var/lib/mysql/
|
||||
|
||||
|
||||
redis:
|
||||
container_name: iot-redis
|
||||
image: redis:6-alpine
|
||||
|
@ -27,46 +26,35 @@ services:
|
|||
server:
|
||||
container_name: iot-server
|
||||
build:
|
||||
context: ./
|
||||
context: .
|
||||
image: iot-server
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8086:8086"
|
||||
- "8089:8086"
|
||||
- "8088:8082"
|
||||
environment:
|
||||
# https://github.com/polovyivan/docker-pass-configs-to-container
|
||||
SPRING_PROFILES_ACTIVE: local
|
||||
SPRING_PROFILES_ACTIVE: mysql
|
||||
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_URL: ${MASTER_DATASOURCE_URL:-jdbc:mysql://iot-mysql:3306/iotkit?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true}
|
||||
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_USERNAME: ${MASTER_DATASOURCE_USERNAME:-root}
|
||||
SPRING_DATASOURCE_DYNAMIC_DATASOURCE_MASTER_PASSWORD: ${MASTER_DATASOURCE_PASSWORD:-123456}
|
||||
# SPRING_DATASOURCE_DYNAMIC_DATASOURCE_SLAVE_URL: ${SLAVE_DATASOURCE_URL:-jdbc:mysql://iot-mysql:3306/iotkit?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true}
|
||||
# SPRING_DATASOURCE_DYNAMIC_DATASOURCE_SLAVE_USERNAME: ${SLAVE_DATASOURCE_USERNAME:-root}
|
||||
# SPRING_DATASOURCE_DYNAMIC_DATASOURCE_SLAVE_PASSWORD: ${SLAVE_DATASOURCE_PASSWORD:-123456}
|
||||
SPRING_REDIS_HOST: ${REDIS_HOST:-iot-redis}
|
||||
SPRING_REDIS_PORT: 6379
|
||||
JAVA_OPTS:
|
||||
${JAVA_OPTS:-
|
||||
-Xms512m
|
||||
-Xmx512m
|
||||
-Djava.security.egd=file:/dev/./urandom
|
||||
-DdisabledEmbeddedRedis=true
|
||||
}
|
||||
ARGS:
|
||||
--spring.datasource.dynamic.datasource.master.url=${MASTER_DATASOURCE_URL:-jdbc:mysql://iot-mysql:3306/iotkit?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true}
|
||||
--spring.datasource.dynamic.datasource.master.username=${MASTER_DATASOURCE_USERNAME:-root}
|
||||
--spring.datasource.dynamic.datasource.master.password=${MASTER_DATASOURCE_PASSWORD:-123456}
|
||||
--spring.datasource.dynamic.datasource.slave.url=${SLAVE_DATASOURCE_URL:-jdbc:mysql://iot-mysql:3306/iotkit?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true}
|
||||
--spring.datasource.dynamic.datasource.slave.username=${SLAVE_DATASOURCE_USERNAME:-root}
|
||||
--spring.datasource.dynamic.datasource.slave.password=${SLAVE_DATASOURCE_PASSWORD:-123456}
|
||||
--spring.redis.host=${REDIS_HOST:-iot-redis}
|
||||
volumes:
|
||||
- ./data/dist:/usr/share/nginx/html
|
||||
depends_on:
|
||||
- redis
|
||||
|
||||
admin:
|
||||
container_name: iot-admin
|
||||
build:
|
||||
context: ./iot-ui-admin
|
||||
args:
|
||||
NODE_ENV:
|
||||
ENV=${NODE_ENV:-production}
|
||||
PUBLIC_PATH=${PUBLIC_PATH:-/}
|
||||
VUE_APP_TITLE=${VUE_APP_TITLE:-openiita管理系统}
|
||||
image: iot-admin
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:80"
|
||||
depends_on:
|
||||
- server
|
||||
- mysql
|
||||
|
||||
volumes:
|
||||
mysql:
|
||||
|
|
|
@ -3,7 +3,7 @@ MYSQL_DATABASE=iotkit
|
|||
MYSQL_ROOT_PASSWORD=123456
|
||||
|
||||
## server
|
||||
JAVA_OPTS=-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom
|
||||
JAVA_OPTS=-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom -DdisabledEmbeddedRedis=true
|
||||
|
||||
MASTER_DATASOURCE_URL=jdbc:mysql://iot-mysql:3306/${MYSQL_DATABASE}?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||
MASTER_DATASOURCE_USERNAME=root
|
||||
|
|
Loading…
Reference in New Issue