栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

php 使用nacos部署配置中心,无侵入式部署

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

php 使用nacos部署配置中心,无侵入式部署

1、根据nacos文档描述部署nacos服务端

https://nacos.io/zh-cn/docs/quick-start-docker.html
注:可以根据自己需求修改对应文件后在构建docker容器

2、使用go-nacos脚本

源码地址:https://github.com/wannanbigpig/go-nacos

项目已经打包好了mac和liunx环境执行文件,下载地址:
https://github.com/wannanbigpig/go-nacos/releases/tag/v0.1.0

  • 部署命令如下
./go-nacos-liunx --help  // 查看参数
    
./go-nacos-liunx -dataId=test -group=dev -path=/home/www/xxxx/ -filename=.env 
    
# // OR 后台运行
    
nohup /home/go-nacos/go-nacos-liunx -dataId=test -group=dev -path=/home/www/xxxx/ -filename=.env  > runoob.log 2>&1 &
  • 可以执行以下命令查看参数

./go-nacos-liunx -help

Usage of bin/go-nacos:
  -dataId string
    	the dataId in nacos
  -filename string
    	Local Storage filename
  -group string
    	the group in nacos (default "DEFAULT_GROUP")
  -ip string
    	the ip in nacos (default "127.0.0.1")
  -namespace string
    	the namespace in nacos
  -password string
    	the password to authenticate with (default "nacos")
  -path string
    	Local Storage Path
  -port uint
    	the port in nacos (default 8848)
  -username string
    	the username to authenticate as (default "nacos")
  -version
    	print version and exit

ps:非常适合解决 laravel 框架多机器部署时 .env 配置要分别部署的烦恼

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/845055.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号