问题的根本缘由是web console 的bug(实际上仍是python 对于依赖版本出来不明确)python
FROM python:slim-stretch
LABEL AUTHOR="dalongrong"
LABEL EMAIL="1141591465@qq.com"
WORKDIR /app
RUN apt-get update && apt-get install -y --reinstall build-essential \
&& pip install circus chaussette \
&& apt-get remove -y --purge build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY circus.ini /app/
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
#!/bin/sh
circusd /app/circus.ini
[circus]
statsd = True
[watcher:webapp]
cmd = /usr/local/bin/chaussette --fd $(circus.sockets.web)
numprocesses = 5
use_sockets = True
[socket:web]
host = 0.0.0.0
port = 9999
说明由于pyzmq 以及tornado 版本的问题,进行了特殊处理git
FROM python:2.7-slim-stretch
LABEL AUTHOR="dalongrong"
LABEL EMAIL="1141591465@qq.com"
RUN apt-get update && apt-get install -y --reinstall build-essential \
&& pip install circus-web \
&& pip uninstall -y tornado \
&& pip uninstall -y pyzmq \
&& pip install tornado==3.2.2 \
&& pip install pyzmq==16.0.4 \
&& apt-get remove -y --purge build-essential \
&& rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]
#!/bin/sh
circushttpd
使用docker-composegithub
version: "3"
services:
circus:
image: dalongrong/circus:3.7-slim-stretch
ports:
- "9999:9999"
- "5555:5555"
volumes:
- "./circus.ini:/app/circus.ini"
circus-web:
image: dalongrong/circusd-web:2.7-slim-stretch
ports:
- "8080:8080"
数据卷挂载方式web
[circus]
statsd = True
check_delay = 5
endpoint = tcp://0.0.0.0:5555
pubsub_endpoint = tcp://0.0.0.0:5556
stats_endpoint= tcp://0.0.0.0:5557
[watcher:webapp]
cmd = /usr/local/bin/chaussette --fd $(circus.sockets.web)
numprocesses = 5
use_sockets = True
[socket:web]
host = 0.0.0.0
port = 9999
docker-compose up -d
由于web console 获取circus stats 接口地址错误(bug),形成没法获取进行的统计信息,只能进行操做处理,同时这种处理方式并非很安全,实际推荐
基于ipc 通讯,并经过ssh tunneling 进行管理以及通讯信息查看docker
https://github.com/rongfengliang/circusd-web-docker
https://github.com/rongfengliang/circusd-docker
https://github.com/rongfengliang/circus-docker-compose
https://cloud.docker.com/repository/docker/dalongrong/circusd-web
https://cloud.docker.com/repository/docker/dalongrong/circusd安全