加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yml 2.22 KB
一键复制 编辑 原始数据 按行查看 历史
lmay 提交于 2021-12-12 22:34 . feat: k8s.
version: '3'
services:
# lmay-mysql:
# build:
# context: ./db
# image: lmay-mysql
# container_name: lmay-mysql
# restart: "no"
# hostname: lmay-mysql
# environment:
# MYSQL_ROOT_PASSWORD: root
# MYSQL_ROOT_HOST: '%'
# ports:
# - 3306:3306
#
# lmay-redis:
# image: redis:6.2.3
# container_name: lmay-redis
# restart: "no"
# hostname: lmay-redis
# ports:
# - 6379:6379
# command: redis-server --requirepass 123456
# lmay-nacos:
# container_name: lmay-nacos
# image: zhusaidong/nacos-server-m1:2.0.3
# restart: "no"
# hostname: lmay-nacos
# ports:
# - 8848:8848
# # 客户端gRPC请求服务端端口,用于客户端向服务端发起连接和请求
# - 9848:9848
# environment:
# - PREFER_HOST_MODE=hostname
# - MODE=standalone
# - SPRING_DATASOURCE_PLATFORM=mysql
# - MYSQL_SERVICE_HOST=lmay-mysql
# - MYSQL_SERVICE_DB_NAME=nacos_db
# - MYSQL_SERVICE_PORT=3306
# - MYSQL_SERVICE_USER=root
# - MYSQL_SERVICE_PASSWORD=root
# depends_on:
# - lmay-mysql
ms-gateway-web:
build: ./ms-gateway/ms-gateway-web
image: lmay/ms-gateway-web
container_name: ms-gateway-web
restart: "no"
hostname: ms-gateway-web
ports:
- 80:80
environment:
- NACOS_SERVER
- REDIS_SERVER
- REDIS_PASSWORD
# depends_on:
# - lmay-redis
# - lmay-nacos
# networks:
# - internal_access
# - external_access
# ms-oauth:
# build:
# context: ./ms-services/ms-service-oauth
# image: lmay/ms-service-oauth
# container_name: ms-oauth
# restart: "no"
# hostname: ms-oauth
# ports:
# - 8002:8002
# depends_on:
# - lmay-mysql
# - lmay-redis
# - lmay-nacos
ms-service-user:
build: ./ms-services/ms-service-user
image: lmay/ms-service-user
container_name: ms-service-user
restart: "no"
hostname: ms-service-user
environment:
- MYSQL_SERVER
- NACOS_SERVER
- REDIS_SERVER
- REDIS_PASSWORD
# depends_on:
# - lmay-mysql
# - lmay-redis
# - lmay-nacos
#networks:
# default:
# external:
# name: net-lmay
#networks:
# internal_access:
# internal: true
# external_access:
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化