摘要: 分别映射 /app 和 /go 目录。示例: docker run --rm -it \ -v /home/txl/pro:/app \ -v /home/txl/gopath:/go \ -w /app \ -e CGO_ENABLED=0 \ -e GOPROXY=https://goproxy 阅读全文
posted @ 2023-02-02 22:26 Azure沫 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 假设现在有一张表 users | id | created_at | | | | | 1 | 2022-11-05 15:05:02.102674 | | 2 | 2022-11-05 07:50:34.753416 | | 3 | 2022-11-06 08:36:11.619856 | | 4 阅读全文
posted @ 2022-12-13 11:58 Azure沫 阅读(873) 评论(0) 推荐(1) 编辑
摘要: 当我们的业务使用了反向代理、负载均衡、cdn加速等等,我们就要设置信任的代理IP。 如果你不清楚代理服务器IP,或者IP会一直变动。可以设置信任所有代理。(这样是极其不安全的,用户可以伪造X-Forwarded-For来伪造IP) 创建中间件 $ php artisan make:middlewar 阅读全文
posted @ 2022-12-08 13:33 Azure沫 阅读(277) 评论(0) 推荐(1) 编辑
摘要: 介绍 Nginx Ingress 在Kubernetes集群中,Ingress作为集群内服务对外暴露的访问接入点,其几乎承载着集群内服务访问的所有流量。Ingress是Kubernetes中的一个资源对象,用来管理集群外部访问集群内部服务的方式。您可以通过Ingress资源来配置不同的转发规则,从而 阅读全文
posted @ 2022-11-24 18:27 Azure沫 阅读(3358) 评论(0) 推荐(2) 编辑
摘要: 一. 概述 ELK是三个开源软件的缩写,分别表示:Elasticsearch , Logstash, Kibana , 它们都是开源软件。新增了一个FileBeat,它是一个轻量级的日志收集处理工具(Agent),Filebeat占用资源少,适合于在各个服务器上搜集日志后传输给Logstash,官方 阅读全文
posted @ 2022-11-13 01:33 Azure沫 阅读(4292) 评论(1) 推荐(2) 编辑
摘要: 一般有两种方式 使用一个简单的官方docker registry镜像 使用harbor Harbor是由VMware公司开源的企业级的Docker Registry管理项目,它包括权限管理(RBAC)、LDAP、日志审核、管理界面、自我注册、镜像复制和中文支持等功能 准备 安装docker-comp 阅读全文
posted @ 2021-12-02 15:31 Azure沫 阅读(269) 评论(0) 推荐(1) 编辑
摘要: nfs(Network File System),通过网络,让不同的机器、不同的操作系统可以共享彼此的文件。 Server端 安装 sudo yum -y install nfs-utils 如果要监听在固定端口 sudo vi /etc/sysconfig/nfs 加入内容 LOCKD_TCPPO 阅读全文
posted @ 2021-11-22 15:12 Azure沫 阅读(54) 评论(0) 推荐(1) 编辑
摘要: 准备 安装docker 停止&删除容器(非必须) docker stop $(docker ps -a -q) docker rm $(docker ps -a -q) 关闭防火墙 systemctl stop firewalld && systemctl disable firewalld 关闭S 阅读全文
posted @ 2021-11-22 14:24 Azure沫 阅读(86) 评论(0) 推荐(0) 编辑
摘要: Goland同步代码 配置一个deployment 这里go代码全部会放在服务器 ~/myweb/src 文件夹下面 使用golang容器编译 docker run --rm -it \ -v /home/txl/myweb:/app \ -v /home/txl/gopath:/go \ -w / 阅读全文
posted @ 2021-11-21 14:15 Azure沫 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 步骤 生成密钥(公钥与私钥); 放置公钥(Public Key)到服务器 ~/.ssh/authorized_key 文件中; 配置ssh客户端使用密钥登录。 生成密钥 执行 ssh-keygen,两次回车,代表免密登录。 进入目录,windows目录是C:\Users\Administrator\ 阅读全文
posted @ 2021-11-21 11:20 Azure沫 阅读(307) 评论(0) 推荐(0) 编辑