规范部分问题,解决疑似redis无法连接的问题

master
Chopper 2021-08-03 11:27:12 +08:00
parent b4fab8c2ad
commit 14bdfb995b
1 changed files with 6 additions and 12 deletions

View File

@ -13,8 +13,7 @@ services:
- "MYSQL_ROOT_PASSWORD=lilishop" - "MYSQL_ROOT_PASSWORD=lilishop"
- "MYSQL_DATABASE=lilishop" - "MYSQL_DATABASE=lilishop"
- "TZ=Asia/Shanghai" - "TZ=Asia/Shanghai"
ports: network_mode: host
- 3306:3306
mongo: mongo:
image: mongo image: mongo
@ -31,12 +30,11 @@ services:
redis: redis:
image: redis image: redis
restart: always restart: always
container_name: 'redis'
ports: ports:
- 6379:6379 - 6379:6379
volumes: volumes:
- ../volumes/data/redsidata:/data - ../volumes/data/redsidata:/data
networks:
- "redisnet"
command: redis-server --port 6379 --requirepass lilishop --appendonly yes command: redis-server --port 6379 --requirepass lilishop --appendonly yes
elasticsearch: elasticsearch:
@ -68,7 +66,8 @@ services:
kibana: kibana:
image: docker.elastic.co/kibana/kibana:7.3.0 image: docker.elastic.co/kibana/kibana:7.3.0
container_name: kibana container_name: kibana
ports: ['5601:5601'] ports:
- 5601:5601
# volumes: # volumes:
# - "./config/kibana.yml:/usr/share/kibana/config/kibana.yml" # - "./config/kibana.yml:/usr/share/kibana/config/kibana.yml"
networks: networks:
@ -84,13 +83,13 @@ services:
networks: networks:
- stack - stack
depends_on: ['elasticsearch'] depends_on: ['elasticsearch']
ports: ['4560:4560'] ports:
- 4560:4560
# rocket mq name server # rocket mq name server
rmqnamesrv: rmqnamesrv:
image: foxiswho/rocketmq:server image: foxiswho/rocketmq:server
container_name: rocket-server container_name: rocket-server
network_mode: host
environment: environment:
JAVA_OPT_EXT: "-server -Xms64m -Xmx64m -Xmn64m" JAVA_OPT_EXT: "-server -Xms64m -Xmx64m -Xmn64m"
ports: ports:
@ -103,7 +102,6 @@ services:
rmqbroker: rmqbroker:
image: foxiswho/rocketmq:broker image: foxiswho/rocketmq:broker
container_name: rocket-broker container_name: rocket-broker
network_mode: host
ports: ports:
- 10909:10909 - 10909:10909
- 10911:10911 - 10911:10911
@ -122,7 +120,6 @@ services:
rmqconsole: rmqconsole:
image: styletang/rocketmq-console-ng image: styletang/rocketmq-console-ng
container_name: rocket-console container_name: rocket-console
network_mode: host
ports: ports:
- 8180:8180 - 8180:8180
environment: environment:
@ -136,8 +133,6 @@ services:
image: xuxueli/xxl-job-admin:2.3.0 image: xuxueli/xxl-job-admin:2.3.0
container_name: xxl-job container_name: xxl-job
network_mode: host network_mode: host
ports:
- 9001:9001
environment: environment:
- PARAMS=--spring.datasource.url=jdbc:mysql://127.0.0.1:3306/lilishop?Unicode=true&characterEncoding=UTF-8 --spring.datasource.username=root --spring.datasource.password=lilishop --server.port=9001 - PARAMS=--spring.datasource.url=jdbc:mysql://127.0.0.1:3306/lilishop?Unicode=true&characterEncoding=UTF-8 --spring.datasource.username=root --spring.datasource.password=lilishop --server.port=9001
depends_on: depends_on:
@ -146,5 +141,4 @@ services:
- ../volumes/data/xxl-job:/data/applogs - ../volumes/data/xxl-job:/data/applogs
networks: networks:
stack: stack:
redisnet:
driver: bridge driver: bridge