我遇到了運行後,我的多容器泊塢窗設置以下錯誤泊塢窗 - 撰寫建& &泊塢窗,撰寫並試圖打我的索引頁:Docker容器經歷插座問題(單獨瓶+ Nginx的容器)
[crit] 8#8: *1 connect() to unix:/tmp/uwsgi.sock failed (2: No such file or directory) while connecting to upstream, client: 192.168.99.1, server: localhost, request: "GET/HTTP/1.1", upstream: "uwsgi://unix:/tmp/uwsgi.sock:", host: "192.168.99.100"
這裏是我的搬運工,compose.yml:
web:
restart: always
build: ./web-app
expose:
- "8000"
command: /usr/local/bin/uwsgi --ini sample-uwsgi.ini
nginx:
restart: always
build: ./nginx/
ports:
- "80:80"
links:
- web:web
的nginx/Dockerfile
FROM nginx
RUN rm /etc/nginx/conf.d/default.conf
ADD sample-nginx.conf /etc/nginx/conf.d/
nginx的/採樣nginx.conf
server {
listen 80;
server_name localhost;
charset utf-8;
client_max_body_size 75M;
location/{
include uwsgi_params;
uwsgi_pass unix:/tmp/uwsgi.sock;
}
}
web的應用程序/ Dockerfile
FROM ansible/ubuntu14.04-ansible:stable
WORKDIR /root
ADD application.py application.py
ADD requirements.txt requirements.txt
ADD sample-uwsgi.ini sample-uwsgi.ini
ADD ansible /srv/ansible
WORKDIR /srv/ansible
RUN ansible-playbook container-bootstrap.yml -c local
web的應用程序/採樣uswgi.ini
[uwsgi]
module = application
callable = app
master = true
processes = 5
socket = /tmp/uwsgi.sock
chown-socket = www-data:www-data
vacuum = true
enable-threads=True
die-on-term = true
UPDATE
在廣告上從@kryten我將使用TCP/IP副
更新nginx.conf:
server {
listen 80;
server_name localhost;
charset utf-8;
client_max_body_size 75M;
location/{
uwsgi_pass localhost:8000;
include uwsgi_params;
}
}
更新uwsgi.ini:
[uwsgi]
module = application
callable = app
master = true
processes = 5
socket = localhost:8000
chown-socket = www-data:www-data
vacuum = true
enable-threads=True
die-on-term = true
,我現在追求以下錯誤:
[error] 8#8: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.99.1, server: localhost, request: "GET/HTTP/1.1", upstream: "uwsgi://127.0.0.1:8000", host: "192.168.99.100"
我已經根據你的建議進行了修改,現在打張貼在 – Erik