以下、dockerコンテナ内でnginxをたてようとしていますが、以下のようなエラーがでます。
そこでupstreamコンテキスト内の server app.default.svc.cluster.local:3031;が間違っていると疑っています。
何かお気づきな点ありましたら教えて頂けませんでしょうか?
Error --- root@3f5061c5e40f:/# /usr/sbin/nginx -t 2018/10/31 08:23:44 [emerg] 8#8: host not found in upstream "app.default.svc.cluster.local:3031" in /etc/nginx/nginx.conf:31 nginx: [emerg] host not found in upstream "app.default.svc.cluster.local:3031" in /etc/nginx/nginx.conf:31 nginx: configuration file /etc/nginx/nginx.conf test failed --- nginx.conf --- user nginx; worker_processes 1; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; upstream uwsgi { server app.default.svc.cluster.local:3031; } server { listen 80; charset utf-8; location / { include uwsgi_params; uwsgi_pass uwsgi; } location /healthcheck { return 200 'OK'; } #location /static { # alias /static; #} } } --- Dockerfile --- FROM nginx COPY ./nginx.conf /etc/nginx/nginx.conf CMD ["nginx", "-g", "daemon off;","-c","/etc/nginx/nginx.conf"] ---
あなたの回答
tips
プレビュー