Nodejs Prisma Connect DB in Sslmode

Nodejs Prisma Connect Db in Sslmode 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/07/19/nodejs-prisma-connect-db-in-sslmode/ Prisma connect Heroku Database with SSL PrivateLink: https://devcenter.heroku.com/articles/heroku-postgres-via-privatelink External Access with Certs and Key 0. Pre-Test 0.1. Test the Certificate (1) Using TablePlus to test the SSL Certificates. It works. (2) Using psql command to test 1 psql "postgres://${UserName}:${DumpPass123}@{DB_HOST}:5432/{DB_Name}?sslmode=require&sslrootcert=root.crt&sslkey=postgresql.key&sslcert=postgresql.crt" 0.2. Check the Prisma Docs From the Prisma’s docs - Configuring an SSL Connection , it supports PCKS12 only. sslmode=(disable|prefer|require) sslcert=/some/path/ca.pem sslidentity=/some/path/cert.p12 sslpassword={dump_pass} : provide while generating the cert.p12 sslaccept=(strict|accept_invalid_certs) : accept_invalid_certs is required if using the self-signed certficate. 1. download the ssl key and crts download the certificates files add your ip into whitelist 2. convert crt to pem https://stackoverflow.com/questions/4691699/how-to-convert-crt-to-pem openssl x509 -in postgresql.crt -out postgresql.crt.pem -outform PEM 3. convert crt and pem……

阅读全文

Aliyun ACK 集群 Flannel 多路由表故障

Aliyun ACK 集群 Flannel 多路由表故障 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/06/06/aliyun-ack-flannel-network-issue/ 0. 环境 Aliyun ACK 集群 (master 托管) Flannel 网络 多路由表 1. 故障现象 服务从外部访问 相应缓慢, 甚至 超时 kubectl metrics 信息 跨节点的 Pod 网络不通, 但同节点正常。 无妨访问外网 2. 故障原因 当 (1)阿里云 ACK 集群 节点所在的 VPC (2)开启多个路由表 , 且 (3)集群使用 Flannal 网……

阅读全文

Cobrautils: 让绑定参数更简单

Cobrautils: 让绑定参数更简单 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/03/29/cobrautils-bind-parameters/ 有群友说, python 命令行绑定参数方便。 本来没什么 还要顺口踩一脚 go 的参数绑定不方便。 这个能忍? CobraUtils 使用结构体绑定参数 cobra 绝对是命令行库中的第一梯队, kubectl 也是使用这个库实现的。 现在的问题是: 怎么才能 快速方便 的绑定参数呢? 那就必须用 反射 实……

阅读全文

K8s API 依赖导入链的版本问题

K8s API 依赖导入链的版本问题 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/03/25/k8s-api-import-chain-problem/ 1 2 3 4 5 6 7 8 // go.mod // 异常的版本依赖指定和引用 require ( k8s.io/api v0.28.8 k8s.io/client-go v0.28.8 k8s.io/apimachinery v0.28.8 ) 由于依赖链的中的版本问题, 导致 k8s.io 被默认指向了当前最新版本 v0.29.3。 但是出现了一点点小问题, 导致 go mod tidy 失败。 go: github.com/example/kubez/pkg/healthy imports k8s.io/client-go/kubernetes imports k8s.io/client-go/kubernetes/typed/auditregistration/v1alpha1 imports k8s.io/api/auditregistration/v1alpha1: module k8s.io/api@latest found (v0.29.3), but does not contain package k8s.io/api/auditregistration/v1alpha1 go:……

阅读全文

Cors Rules

CORS 跨域规则 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/03/19/cors-rules/ 1. 因为 axios 封装遇到的跨域问题 本地服务器: http://127.0.0.1:5173, 后端服务器 http://127.0.0.1:8888。 服务器程序为 json-server。 进行如下封装后, 出现跨域问题, 尝试搜索 json-server 允许跨域配置, 始终无果。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17……

阅读全文

Technique English

Technique English 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/03/05/technique-english/ integrity check 完整性检查……

阅读全文

Karabiner Keyboard Assistant

Karabiner Keyboard Assistant 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/03/05/karabiner-keyboard-assistant/ 下载地址 karabiner 是一款 mac 系统下 免费 的键位修改器。 https://karabiner-elements.pqrs.org/ 自定义配置 配置文件目录: ~/.config/karabiner/assets/complex_modifications/ ctrl + hjkl 的 vim 风格移动键位 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70……

阅读全文

Json Server Not Found

Json Server Not Found 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/02/26/json-server-not-found/ 使用 本地安装 安装 json-server, 启动时出现 json-server not found 的错误。 1 $ npm install json-server 这时, 需要使用 npx 命令启动 1 $ npx json-server --watch data.json --port 3101 如果想要直接使用 json-server 的话, 需要执行 全局安装 1 2 3 $ npm install json-server -g # or $ npm install json-server --save-dev 之后就可以直接安装了。 1 $ json-server --watch data.json --port 3101……

阅读全文

PromQL 从入门到精通(电子书)

PromQL 从入门到精通(电子书) 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/02/26/promql-learning-book/ 群友分享。 下载地址: PromQL 从入门到精通.pdf……

阅读全文

一个关于 Nodejs Dockerfile 的小优化

一个关于 Nodejs Dockerfile 的小优化 建议点击 查看原文 查看最新内容。 原文链接: https://typonotes.com/posts/2024/02/20/a-simple-optimizion-for-nodejs-dockerfile/ 原版 Dockerfile 如下。 1 2 3 4 5 6 7 8 9 10 FROM ${BASE_IMAGE} as env RUN mkdir -p /app && chown -R node:node /app WORKDIR /app COPY package*.json ./ COPY .npmrc ./ USER node ## 问题在这里, npm install 失败之后, 无法看到具体错误 RUN npm install 在执行完成 npm install 之后没有更多的 错误判断。 如果没有出错, 一切都正常。 往下走就行了。 但是执行出错……

阅读全文

福利派送

  • (免费星球)「运维成长路线」

  • 又拍云免费 CDN

最近文章

分类

标签

其它