代码拉取完成,页面将自动刷新
# 整个服务需要的中间件
version: "3.0"
services:
redis:
image: redis:6.0.8
ports:
- "6379:6379"
volumes:
- /data/redis/data:/data
- /data/redis/conf/redis.conf:/etc/redis/redis.conf
networks:
- gulimall_net
command: redis-server /etc/redis/redis.conf
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: '123456'
MYSQL_ALLOW_EMPTY_PASSWORD: 'no'
ports:
- "3306:3306"
volumes:
- /data/mysql/log:/var/log/mysql
- /data/mysql/data:/var/lib/mysql
- /data/mysql/conf:/etc/mysql/conf.d
networks:
- gulimall_net
nacos:
image: nacos/nacos-server:v2.0.4
volumes:
- /data/nacos/data:/home/nacos/data
- /data/nacos/logs:/home/nacos/logs
depends_on:
- mysql
environment:
- MODE=standalone
- SPRING_DATASOURCE_PLATFORM=mysql
- MYSQL_SERVICE_HOST=mysql
- MYSQL_SERVICE_PORT=3306
- MYSQL_SERVICE_USER=root
- MYSQL_SERVICE_PASSWORD=123456
- MYSQL_SERVICE_DB_NAME=gulimall_nacos
- PREFER_HOST_MODE=ip
- NACOS_SERVER_PORT=8848
- JVM_XMS=128m
- JVM_XMX=128m
- JVM_XMN=64m
ports:
- 8848:8848
- 9848:9848
- 9849:9849
networks:
- gulimall_net
elasticsearch:
image: elasticsearch:7.14.0
ports:
- "9200:9200"
- "9300:9300"
environment:
- "discovery.type=single-node"
- "ES_JAVA_OPTS=-Xms128m -Xmx256m"
volumes:
- /data/elasticsearch/data:/usr/share/elasticsearch/data
- /data/elasticsearch/config:/usr/share/elasticsearch/config
- /data/elasticsearch/plugins:/usr/share/elasticsearch/plugins
networks:
- gulimall_net
# kibana:
# image: kibana:7.14.0
# depends_on:
# - elasticsearch
# ports:
# - "5601:5601"
# volumes:
# - /data/kibana/kibana.yml:/usr/share/kibana/config/kibana.yml
# networks:
# - gulimall_net
nginx:
image: nginx:1.23
ports:
- "80:80"
volumes:
- /data/nginx/logs:/var/log/nginx
- /data/nginx/html:/usr/share/nginx/html
- /data/nginx/conf:/etc/nginx
networks:
- gulimall_net
rabbitmq:
image: rabbitmq:3.8.8-management
ports:
- "5672:5672"
- "15672:15672"
- "25672:25672"
environment:
TZ: Asia/Shanghai
RABBITMQ_DEFAULT_USER: root
RABBITMQ_DEFAULT_PASS: 123456
volumes:
- /data/rabbitmq/data:/var/lib/rabbitmq
- /data/rabbitmq/conf:/etc/rabbitmq
networks:
- gulimall_net
# # seata 启动报错,需要nacos先启动,即使使用depends_on也没用,restart一下即可
# seata:
# image: seataio/seata-server:1.5.2
# ports:
# - "7091:7091"
# - "8091:8091"
# environment:
# - STORE_MODE=db
# - SEATA_PORT=8091
# volumes:
# - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime
# - /usr/share/zoneinfo/Asia/Shanghai:/etc/timezone
# - /data/seata/resources:/seata-server/resources # 先启动cp出来
# depends_on:
# - nacos
# networks:
# - gulimall_net
sentinel:
image: bladex/sentinel-dashboard:1.8.0
ports:
- "8858:8858"
networks:
- gulimall_net
zipkin:
image: openzipkin/zipkin:2.23.19
ports:
- "9411:9411"
networks:
- gulimall_net
networks:
gulimall_net:
ipam:
config:
- subnet: 192.168.1.0/24 # 网段的 CIDR 格式的子网,防止和校园网网段冲突
gateway: 192.168.1.1 # 主子网的 IPv6 网关
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。