我目前有一个用于 Asp.Net Core 的 docker-compose 设置。但是,在 Kubernetes 中测试集群时,我遇到了 Kestral 的 SSL 问题。最初使用 Docker/Docker-compose 你可以设置本地 SSL
dotnet dev-certs https -ep %USERPROFILE%\.aspnet\https\<app_name>.pfx -p <password>
Run Code Online (Sandbox Code Playgroud)
然后
dotnet dev-certs https --trust
Run Code Online (Sandbox Code Playgroud)
最后
dotnet user-secrets set "Kestrel:Certificates:Development:Password" "<password>"
Run Code Online (Sandbox Code Playgroud)
在 Docker-compose 中,我将卷设置为指向此证书
volumes:
- ${APPDATA}\microsoft\UserSecrets\:/root/.microsoft/usersecrets
- ${USERPROFILE}\.aspnet\https:/root/.aspnet/https/
Run Code Online (Sandbox Code Playgroud)
我很好奇如何使用 kubernetes 在本地测试 https。我看到了一个 git repo https://github.com/Lybecker/k8s-friendly-aspnetcore,但是我不知道如何将 .pfx 文件从我的本地计算机获取到秘密中,我认为复制和粘贴不是要走的路。
我在http 和 https 上查看了这个 SO post Access .NET Core app on Kubernetes on Kubernetes
但是看起来他们正在使用使用 .key 和 .crt 的 .Net 5。我在使用 .pfx 文件的 .Net 3.1 上。
当前正在构建一个程序包以使用AWS测试一些devOps配置。使用Swift Vapor3,PostgreSQL 11,Docker构建应用程序。鉴于我的github Repo,只要vapor build
vapor test
vapor run
您在本地安装了postgresql并安装了一个username: test, password: test
但是我的api没有连接到我的数据库,并且担心我的配置错误。
version: "3.5"
services:
api:
container_name: vapor_it_container
build:
context: .
dockerfile: web.Dockerfile
image: api:dev
networks:
- vapor-it
environment:
POSTGRES_PASSWORD: 'test'
POSTGRES_DB: 'test'
POSTGRES_USER: 'test'
POSTGRES_HOST: db
POSTGRES_PORT: 5432
ports:
- 8080:8080
volumes:
- .:/app
working_dir: /app
stdin_open: true
tty: true
entrypoint: bash
restart: always
depends_on:
- db
db:
container_name: postgres_container
image: postgres:11.2-alpine
restart: unless-stopped
networks:
- vapor-it
ports:
- 5432:5432
environment:
POSTGRES_USER: test …
Run Code Online (Sandbox Code Playgroud) 我有一个功能分支,在主分支之前大约有50个提交.我想检查主分支进行小编辑并将其推出.虽然一旦我输入git checkout master
提示我提交我的更改,突然git已经取消了我所做的所有提交,并要求我在检查主人之前提交它们.
基本上将我的功能分支重新设置回主人的头像.我承诺并努力重置我最近在该分支上的提交,以免失去我的所有工作.自从我添加并删除了许多文件后,是否存在某种错误?
编辑更多信息
我删除了一个node_module browserify,但该模块在master上.在我的功能分支上,添加并提交了所有内容.这是我输入后的错误git checkout master
.
error: unable to create symlink node_modules/.bin/JSONStream: Permission denied
error: unable to create symlink node_modules/.bin/acorn: Permission denied
error: unable to create symlink node_modules/.bin/browser-pack: Permission denied
error: unable to create symlink node_modules/.bin/browserify: Permission denied
error: unable to create symlink node_modules/.bin/deps-sort: Permission denied
error: unable to create symlink node_modules/.bin/insert-module-globals: Permission denied
error: unable to create symlink node_modules/.bin/miller-rabin: Permission denied
error: unable to create symlink node_modules/.bin/module-deps: Permission denied
error: unable to …
我目前正在迁移到这些版本,现在我遇到了许多组件的 forwardRef 问题。有很多使用 forwardRef 的 Function 组件的例子,但是 HOC 类组件呢。还有非常大的嵌套 HOC 组件。
基础组件只是使用材料 ui 输入的输入。
import React, {Component} from 'react'
import {FormControl, Input, withStyles, createStyles} from '@material-ui/core'
const styles = (theme: any) => createStyles({
container: {
},
inputField: {
marginTop: 10,
marginBottom: -2,
fontSize: 18,
borderWidth: 1,
paddingLeft: 15,
paddingTop: 5,
paddingBottom: 5,
boxSizing: 'border-box' as any,
borderStyle: 'groove',
width: '100%',
},
textField: {
width: '100%',
margin: 0,
},
})
/*interface IStyles extends WithStyles<typeof styles> {
container: any
inputField: any
textField: …
Run Code Online (Sandbox Code Playgroud) 我有一个来自 CSV 文件的字符串,其中包含多行:
header1,header2,header3
r1v1,r1v2,r1v3
r2v1,r2v2,r2v3
Run Code Online (Sandbox Code Playgroud)
我正在尝试将这些推入Vec<Vec<String>>
:
// the csv is raw_string
let lines = raw_string.lines();
let mut mainVec = Vec::new();
for row in lines {
let mut childVec = Vec::new();
let trimmed = row.trim();
let values = trimmed.split(',').collect();
childVec.push(values);
mainVec.push(childVec.clone());
}
Run Code Online (Sandbox Code Playgroud)
但我得到了错误
header1,header2,header3
r1v1,r1v2,r1v3
r2v1,r2v2,r2v3
Run Code Online (Sandbox Code Playgroud) asp.net-core ×1
docker ×1
git ×1
kubernetes ×1
material-ui ×1
postgresql ×1
reactjs ×1
rust ×1
ssl ×1
string ×1
vapor ×1
vector ×1