摘要: 核心是entrypoint.sh脚本中的内容。 Dockerfile案例 FROM python:3.9.16 WORKDIR /code ADD requirements.txt /code/requirements.txt RUN pip install -i https://pypi.tuna 阅读全文
posted @ 2024-07-03 17:27 bhxuwei 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 坑点 ginx location 正则 alias 和 try_files, 存在排斥情况,不能一起使用,要使用root。 案例如下 # 老版本门户前端 location ^~ /assets { alias /usr/share/nginx/homepage_test/assets/; # 老版本 阅读全文
posted @ 2023-12-11 17:59 bhxuwei 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 参考链接 https://studygolang.com/articles/3138 func dialTimeout(network, addr string) (net.Conn, error) { return net.DialTimeout(network, addr, time.Secon 阅读全文
posted @ 2023-11-30 10:20 bhxuwei 阅读(59) 评论(0) 推荐(0) 编辑
摘要: 转载至:https://blog.51cto.com/u_15287666/5805969 ## 查询所有命名空间下image运行起来的资源 ``` kubectl get all -o wide -A ``` 缺点:这种方法 kubectl get all 其实查询出来不是全部资源,仅仅是常用资源 阅读全文
posted @ 2023-08-23 14:11 bhxuwei 阅读(7) 评论(0) 推荐(0) 编辑
摘要: WSGI:Web服务器网关接口(Python Web Server Gateway Interface,缩写为WSGI)是为Python语言定义的Web服务器和Web应用程序或框架之间的一种简单而通用的接口。 Gunicorn 是一个使用 WSGI 标准的应用服务器。 Flask 和 DJango可 阅读全文
posted @ 2023-08-07 16:05 bhxuwei 阅读(1155) 评论(0) 推荐(0) 编辑
摘要: location中的try_files location /images/ { root /opt/html/; try_files $uri $uri/ /images/default.gif; } 比如 请求 127.0.0.1/images/test.gif 会依次查找 文件/opt/html 阅读全文
posted @ 2023-07-21 16:22 bhxuwei 阅读(31) 评论(0) 推荐(0) 编辑
摘要: ## 创建项目 create-vue创建vue3项目 推荐,这个库也是官方进行维护的,所以使用起来无烦恼,yyds。 执行方式也是比较简单的,我们可以基于vite创建vue3或者vue2的项目 ``` npm init vue@3 npm init vue@2 ``` 依次填写和选择下列选项 ``` 阅读全文
posted @ 2023-07-06 17:13 bhxuwei 阅读(31) 评论(0) 推荐(0) 编辑
摘要: 本教程只适用 Docker 版本 >= v17.05.0 命令 df -Th 可以看到当前docker存储的路径 停止 docker 服务 sudo systemctl stop docker.socket sudo systemctl stop docker.service 迁移docker文件 阅读全文
posted @ 2023-06-01 09:46 bhxuwei 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 添加用户 [root@devops ~]# adduser xuwei 为这个用户初始化密码,linux会判断密码复杂度,不过可以强行忽略: [root@devops ~]# passwd xuwei 赋予sudo权限 vim /etc/sudoers 添加一行 sudoers没有修改权限 # 查看 阅读全文
posted @ 2023-06-01 09:17 bhxuwei 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 使用 fdisk 进行硬盘的挂载分区时,发现最大只能分配 2 T ,所以超过 2 T 的硬盘我们需要使用 parted 命令进行硬盘的分区 - 使用 fdisk -l 查看当前服务器硬盘 ## 使用 parted 对磁盘进行分区 ``` $ parted /dev/sdb # 对/dev/sdb进行 阅读全文
posted @ 2023-05-31 11:11 bhxuwei 阅读(76) 评论(0) 推荐(0) 编辑