WhiteLament

WhiteLament

V2EX member #110886, joined on 2015-04-14 09:16:28 +08:00
Per WhiteLament's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
WhiteLament's recent replies
Oct 11, 2017
Replied to a topic by shallyy 云计算 请教各位这个 docker 该怎么运行
我又看了一下,你一开始 build 缺的 Dockerfile 应该是指这个 scripts/proxy/Dockerfile
这个 semaphore_proxy 是一个 nginx 的 docker

你可以把 docker-compose.yml 最后那段改成形如这样

semaphore_proxy:
build:
context: ./scripts/proxy
dockerfile: ./Dockerfile

这样它会去找构建 nginx 的 Dockerfile
但是这个 nginx 的 Dockerfile 还需要一个证书:

ADD cert/ /etc/nginx/cert

它项目里没包括证书,需要你自己准备

各种坑……
Oct 11, 2017
Replied to a topic by shallyy 云计算 请教各位这个 docker 该怎么运行
dockerfile 可以这样指定:

https://docs.docker.com/compose/compose-file/

version: '2'
services:
webapp:
build:
context: ./dir
dockerfile: Dockerfile-alternate

你也可以按#6 说的直接复制进去就好
Oct 11, 2017
Replied to a topic by shallyy 云计算 请教各位这个 docker 该怎么运行
docker-compose --verbose up
输出调试信息来排查
>>网上教程经常改 conf,或者在 conf.d 里新建 conf 文件——不明白有何不同。
因为实际情况一台机器上往往会有多个站点,每个站点一个单独的 conf 文件更方便维护,出错了也容易排查
( nginx 经常一个配置出问题就全部罢工)
为楼上“同一个文件里的优先级”补充一下
例如用 abc.com 反代了一个程序,访问 abc.com 时需要浏览器自动跳转到 abc.com/subpath
那么下面这样写可以达到目的( location =/ 表示仅仅匹配 / ,location /匹配以 / 开头的任意。)

server {
server_name abc.com;
location =/ {
return 301 /subpath;
}
location / {
proxy_pass xxx;
}
}

而下面这样交换顺序后就失效了,Nginx 匹配到 location /就忽略了 location =/

server {
server_name abc.com;
location / {
proxy_pass xxx;
}
location =/ {
return 301 /subpath;
}
}
conf.d 目录下文件的优先级是按文件名字母序来的
同一个文件里的优先级是从上至下的(即有冲突的内容前面的匹配到后会忽略后面的)
Jun 7, 2017
Replied to a topic by caniuse 程序员 nodejs 项目, pm2 和 supervisor 怎么选择?
用得不多,但 pm2 感觉挺方便的
Jun 4, 2017
Replied to a topic by makendk 云计算 GCE 和 AWS 信用卡支付问题
GCE 在用完 300 美元后帐户会自动冻结,如果不去手动升级是不会继续扣费的。
https://cloud.google.com/free/docs/frequently-asked-questions#upgrading-billing
May 22, 2017
Replied to a topic by SlipStupig 程序员 求 docker 集群部署有简单的方案
portainer 最轻量,但是没有私有仓库管理
shipyard 适中,部署比 rancher 简单
rancher 最重功能也最多
May 19, 2017
Replied to a topic by yuningmiao Python 新手 django 的简单问题
@yuningmiao 大概形如这样,我觉得你应该再看一下关于模板的文档
{% for item in form_list %}
<li id="{{item.listid}}" >
<label>{{item.lable}}</label>
<div>
<input id="{{item.inputid}}" name="{{item.name}}" />
</div>
</li>
{% endfor %}

至于你说的 100 个 check box,要看具体结构设计
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1047 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 23:32 · PVG 07:32 · LAX 16:32 · JFK 19:32
♥ Do have faith in what you're doing.