Tag: uwsgi

为什么uWSGI无法在Docker中启动?

我使用uWSGI服务Python应用程序相对来说比较新,我试图用一个vassal在emperor模式下启动一个uWSGI进程,但是每次我尝试使用以下命令(以root身份)在Docker内部启动uWSGI时: # /usr/local/bin/uwsgi –ini /etc/uwsgi/emperor.ini 我得到的回应是: [uWSGI] getting INI configuration from /etc/uwsgi/emperor.ini 2.0.13.1 emperor.iniconfiguration文件如下所示: # files/etc/uwsgi/emperor.ini [uwsgi] emperor = /etc/uwsgi/apps-enabled die-on-term = true log-date = true 而唯一的封臣的configuration看起来像: # files/etc/uwsgi/apps-enabled/application.ini [uwsgi] app_dir = /var/www/server plugin = python master = true callable = app chdir = %(app_dir) mount = /=%(app_dir)/start.py protocol = uwsgi socket = :8079 uid […]

uWSGI + Docker:在$ PATH中找不到可执行文件pyuwsgi:

我有一个运行在我想用来提供Django应用程序的Docker容器中的uwsgi服务。 当我在本地运行uwsgi服务时,一切正常,但从docker容器我得到消息*** no app loaded. going in full dynamic mode *** *** no app loaded. going in full dynamic mode ***和— no python application found, check your startup logs for errors —和Django的应用程序显示内部服务器错误。 这是我的uwsgi.ini文件。 在docker集装箱内,我正在用supervisord启动uwsgi,像[program:uwsgi] command = /usr/local/bin/uwsgi –ini /home/docker/code/uwsgi.ini:docker [uwsgi] # this config will be loaded if nothing specific is specified # load base config […]

如何收集来自uwsgi的指标,帮助collectd

下午好,好人。 帮我find正确的解决scheme。 在一个docker集装箱启动uwsgi应用程序。 在另一个docker集装箱启动的收集器指标 – collectd,收集指标并将其发送到服务器-openstdb。 这个问题我怎么做会收到来自uwsgi收集的指标。 我明白,必须从uwsgi选项“–enable-metrics”开始,并可能添加“–stats-push statsd:address [,prefix]”。 并进入configurationcollections添加插件。 但是,这一切在实践中如何不明白。 感谢任何帮助

uWSGI通过Docker的Supervisord服务应用程序

我正尝试从Docker中为uWSGI提供一个Django应用程序。 我使用supervisord在Dockerfile的结尾处为我启动进程。 当我运行图像时,它说uWSGI进程启动并成功,但我无法在我认为会显示的URL上查看该应用程序。 也许我没有正确的设置/configuration的东西? 我现在没有supervisord启动nginx,因为我目前正在通过Amazon S3提供静态文件,并且希望首先关注如何让wsgi启动并运行。 我成功地使用uwsgi在本地运行uwsgi –init uwsgi.ini:local来运行应用程序,但我无法将它移到docker中。 这是我的Dockerfile FROM ubuntu:14.04 # Get most recent apt-get RUN apt-get -y update # Install python and other tools RUN apt-get install -y tar git curl nano wget dialog net-tools build-essential RUN apt-get install -y python3 python3-dev python-distribute RUN apt-get install -y nginx supervisor # Get Python3 […]

Docker:supervisord不会启动uwsgi

Dockerfile FROM ubuntu:14.04.2 RUN rm /bin/sh && ln -s /bin/bash /bin/sh RUN apt-get -y update && apt-get upgrade -y RUN apt-get install supervisor python build-essential python-dev python-pip python-setuptools -y RUN apt-get install libxml2-dev libxslt1-dev python-dev -y RUN apt-get install libpq-dev postgresql-common postgresql-client -y RUN apt-get install openssl openssl-blacklist openssl-blacklist-extra -y RUN apt-get install nginx -y […]

运行Docker镜像给出:无法从app.py加载configuration

我正在Python Flask的webapp上使用Docker,但是当我尝试运行它的时候出现错误。 $ sudo docker run -t imgcomparer6 unable to load configuration from app.py python 在我的app.py文件中,我在webapp中唯一的app.run()实例在'__main__':函数内(见这里 ) if __name__ == '__main__': app.run(host="127.0.0.1", port=int("8000"), debug=True) Dockerfile FROM ubuntu:latest #Update OS RUN sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list RUN apt-get update RUN apt-get -y upgrade # Install Python RUN apt-get install -y python-dev python-pip RUN mkdir /webapp/ # […]

无法在Alpine上安装uwsgi

我试图安装uwsgi使用pip install uwsgi在我的Alpine docker镜像中,但是不幸的是,它仍然没有真正的错误信息给我: Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-mEZegv/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install –record /tmp/pip-c7XA_e-record/install-record.txt –single-version-externally-managed –compile: running install using profile: buildconf/default.ini detected include path: ['/usr/include/fortify', '/usr/include', '/usr/lib/gcc/x86_64-alpine-linux-musl/5.3.0/include'] Patching "bin_name" to properly install_scripts dir detected CPU cores: 1 configured CFLAGS: -O2 -I. -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -Wextra -Wno-unused-parameter […]

将uWSGI快速路由器放在docker容器中运行的uWSGI服务器前

我在Docker容器中运行了多个基于Flask的webapps(他们的进程需要与主机操作系统隔离)。 要运行这些应用程序,我使用容器内的uWSGI服务器。 传入的请求应该与具有订阅服务器的uWSGI FastRouter匹配(如下所述: http ://uwsgi-docs.readthedocs.org/en/latest/SubscriptionServer.html)。 当启动一个容器时,uWSGI应该根据一些内部configuration来公布自己作为一个子域 。 所以设置看起来像这样: Request —> FastRouter —-> container | myapp1 | | —-> container | myapp2 | 我试图在一台运行快速路由器以及一些docker容器的主机上进行testing。 FastRouter开始使用 uwsgi –fastrouter :1717 –fastrouter-subscription-server localhost:2626 –fastrouter-subscription-slot 1000 问题1我需要做其他事情来使订阅服务器运行吗? 这是否与fastrouter进程一起启动? 容器有两个从主机映射到容器的端口:5000(webapp)和2626(订阅快速路由器)。 所以他们是这样开始的: docker run -d -p 5000:5000 -p 2626:2626 myImage $PATH_TO_START/start.sh 在start.sh中,uWSGI开始于 uwsgi –http :5000 -M –subscribe-to 127.0.0.1:2626:/test –module server –callable […]

从docker容器发送lan包的唤醒

我有一个docker运行python uwsgi应用程序的容器。 该应用程序发送唤醒广播数据包唤醒本地networking中的电脑。 它没有使用泊坞窗(直接在服务器上的普通uwsgi应用程序)工作正常,但与泊坞窗它将无法正常工作。 我暴露了端口9 / udp并绑定了主机系统的端口9。 我在这里错过了什么? 或换句话说,我怎样才能从docker集装箱到外部networking发送一个唤醒LAN命令?

Docker:uwsgi服务无法识别

FROM ubuntu:14.04.2 RUN rm /bin/sh && ln -s /bin/bash /bin/sh RUN apt-get -y update && apt-get upgrade -y RUN apt-get install python build-essential python-dev python-pip python-setuptools -y RUN apt-get install libxml2-dev libxslt1-dev python-dev -y RUN apt-get install libpq-dev postgresql-common postgresql-client -y RUN apt-get install openssl openssl-blacklist openssl-blacklist-extra -y RUN apt-get install nginx -y RUN pip […]