要使用uwsgi-nginx-flask
文件设置uwsgi.ini
服务器,我正在使用this图像。
在构建映像后运行容器时,出现错误:
*** Operational MODE: preforking ***
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. GAME OVER ***
我的项目目录结构如下:
|-- Dockerfile
|-- docker-compose.yml
`-- test-app
|-- app.py
`-- uwsgi.ini
uwsgi.ini
和Dockerfile如下所示:
[uwsgi]
module = test-app.app
callable = app
COPY ./test-app/ /app/test-app/
ENV PYTHONPATH $PYTHONPATH:/app/
RUN mv test-app/uwsgi.ini ./uwsgi.ini
如何成功运行容器?