解决nginx在docker中报错 [rewrite or internal redirection cycle while internally redirecting to "/index.html]

vue项目部署在裸机Linux上运行正常,部署在docker中nginx出现下列错误 text 1 Nginx "rewrite or internal redirection cycle while internally redirecting to "/index.html" 表现在用户界面 500 Internal Server Error 原因:nginx配置路径不对,改成正确的后恢复

 ·  · 

StackStorm自动化 - 包配置

基本概念 从版本 2.4 开始,如果包包含.config.yaml ,可以使用包配置,包配置可以使用配置文件来设置包中资源通用的值,例如 API 凭证、连接详细信息、限制和阈值。这些值在运行时可供操作和传感器使用。 包配置和 Action 参数之间的区别在于,配置通常包含包中所有资源通用的值,并且很少更改。动作参数是随每个动作调用动态提供的,并且可能会发生变化 - 例如,它们可能来自映射某些输入事件的规则。 包配置遵循基础架构即代码方法,并存储在特殊目录中的 YAML 格式文件中(默认情况下 /opt/stackstorm/configs)。每个包都为此配置文件定义自己的架构。 配置 Schema 配置文件的结构是一个 YAML 格式的文件,它定义了该包的配置文件。该配置由包作者自行编写,包含有关每个可用配置项的信息,例如名称, Secret等)。该文件已命名 config.schema.yaml 并位于包目录 /opt/stackstorm/packs/<mypack> 的根目录中。 这是一个示例包配置文件: yaml 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 --- api_key: description: "API key" type: "string" required: true api_secret: description: "API secret" type: "string" secret: true required: true region: description: "API region to use" type: "string" required: true default: "us-east-1" private_key_path: description: "Path to the private key file to use" type: "string" required: false 在该示例中,配置文件由 4 项 配置组成 (api_key, api_secret, region, private_key_path)...

 ·  · 

Docker中的多进程管理 s6-overlay

什么是容器中的多进程管理 在容器中的主进程 (main running process) 是指 Dockerfile中 ENTRYPOINT 或 CMD 指定运行的命令,通常情况下一个进程(服务)为一个容器;也存在一种场景,就是主进程会fork多个子进程,例如nginx,不过这种多进程通常为nginx主进程进行管理。而一些场景下,我们的业务本身就需要多个启用独立的多个进程。 在Docker官方提到了在容器中运行多个服务的方式,官方提出,应该避免这种情况 but to get the most benefit out of Docker, avoid one container being responsible for multiple aspects of your overall application. 但也给出了如何管理多进程的一种思路, Use a wrapper script Use Bash job controls Use a process manager 下面就通过官方给出的这三种方式阐述容器中的多进程管理 Use a wrapper script 对于使用脚本来管理多进程来说,本质上是可以实现多进程的启动,但是你没法去监控(管理)多个进程的运行时,例如 Nginx + PHP 模式, PHP或nginx全部挂掉,只要脚本还在运行,那么这个容器的生命周期还是处于Running Use Bash job controls 这种模式是利用了Bash的后台模式进行短暂的切换进程,但有些镜像不提供Bash这时应该怎么办 Use a process manager 进程管理器,通常情况下大家想到的就是顶顶大名的 supervisor 和 systemd,但这两个程序运行的环境十分苛刻,例如 supervisor 是Python开发的程序,运行需要依赖 Python;而 systemd 的运行条件更为苛刻,例如需要额外运行dbus-damon进行注册到dbus总线之上,这种进程管理器可能运行的进程比我们要管理的进程都要多。在这种场景下,有一个部署简单,配置简单,无依赖的轻量级容器多进程管理器 s6-overlay...

 ·  · 

Awesome kubernetes

Deployment Recommended Cluster Architecture - rancher Hardware recommendations - etcd A simple shell script for backing up etcd v2 and v3 datastores Considerations for large clusters - kubernetes cluster Operating etcd clusters for Kubernetes Recommended performance and scalability practices Binary deploy script pure shell Managing Kubernetes Traffic with F5 NGINX Eraser - Cleaning up Images from Kubernetes Nodes 对于不同规模的 Kubernetes 集群所需要的 etcd 规模推荐 datree: allowing you to scan your k8s configs during development Performance etcd: getting 30% more write/s 蚂蚁集团万级规模 K8s 集群 etcd 高可用建设之路 各组件参数配置调优 万级K8s集群背后etcd稳定性及性能优化实践 K8s 集群稳定性:LIST 请求源码分析、性能评估与大规模基础服务部署调优 Comparing comparing Kubernetes ingress controller Troubleshooting 一次Etcd集群宕机引发的思考 Stern: allows you to tail multiple pods on Kubernetes Diagnosis Kubernetes 自动化诊断工具:k8sgpt-operator ktop: displays useful metrics information about kubernetes cluster Dashboard KDash - A fast and simple dashboard for Kubernetes Security Kubernetes 加固指南 Popeye 扫描实时 Kubernetes 集群并报告已部署资源和配置的潜在问题 Test kube-monkey It randomly deletes Kubernetes (k8s) pods in the cluster encouraging and validating the development of failure-resilient services....

 ·  · 

firewalld去除polkit验证

为什么去除polkit验证 在2021年询问过firewalld项目组,firewalld在dbus通讯时,会进行两部认证 policy kit 和 UID checking,正是因为这种情况,使得firewalld不能够通过TCP/IP连接,如果你需要连接,因为存在 UID checking ,这时会因为没有UID会报错。 firewalld needs to do some authorization on the dbus request. It currently tries two ways, in order of preference: policy kit UID checking Neither of these are available over a TCP/IP dbus connection. [1] 如何去除polkit 首选需要确定你的firewalld版本,例如Centos7系列,那么你的 firewalld 版本为 0.6.3,那么你需要修改的包为 python-firewall-0.6.3, 在 debian11 上 firewalld版本默认为 0.9.3,那么需要关注的版本为:python3-firewall_0.9.3 在确定版本后直接从github仓库进行拉去修改就可以 bash 1 2 git fetch v0.9.3 git checkout v0.9.3 对于 python-firewall-0.6.3 来说。直接注释掉 slip.dbus.polkit.require_auth 就可以了...

 ·  ·