Nginx-proxy: Error with docker compose version 3

Created on 18 Sep 2017  路  1Comment  路  Source: nginx-proxy/nginx-proxy

Hey,
I try lauching nginx-proxy with docker compose version '3', and I get this error...

forego     | starting dockergen.1 on port 5000
forego     | starting nginx.1 on port 5100
nginx.1    | 2017/09/18 07:43:10 [emerg] 29#29: no servers are inside upstream in /etc/nginx/conf.d/default.conf:55
nginx.1    | nginx: [emerg] no servers are inside upstream in /etc/nginx/conf.d/default.conf:55
forego     | starting nginx.1 on port 5200
forego     | sending SIGTERM to nginx.1
forego     | sending SIGTERM to dockergen.1

Here is my docker-compose.yml file:

version: '3'
services:

nginx-proxy:
       image: jwilder/nginx-proxy
       container_name: nginx-proxy
       ports:
       - 970:80
       - 1955:443
       volumes:
       - /docker/nginx/vhost.d:/etc/nginx/vhost.d:rw
       - /var/run/docker.sock:/tmp/docker.sock:ro
       - /docker/nginx/ssl:/etc/nginx/certs:rw
       - /docker/nginx/conf:/etc/nginx/conf.d
       - /docker/nginx/html:/usr/share/nginx/html
       environment:
       - HTTPS_METHOD=nohttp
       - VIRTUAL_PROTO=https
       labels:
       - com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy="true"

 letsencrypt-nginx-proxy-companion:
      image: jrcs/letsencrypt-nginx-proxy-companion
      container_name: letsencrypt
      volumes:
      - /docker/nginx/ssl:/etc/nginx/certs:rw
      - /var/run/docker.sock:/var/run/docker.sock:ro


Here is the /etc/nginx/conf.d/default.conf that was generated:

# graylog.xxxx.xx upstream graylog.xxxx.xx { } server { server_name graylog.laudenlaruto.me; listen 80 ; access_log /var/log/nginx/access.log vhost; include /etc/nginx/vhost.d/default; location / { proxy_pass http://graylog.xxxx.xx; } }
They are on the same network, the default one. What am I missing?

Most helpful comment

Found the solution, you have to set the volume :
- /docker/nginx/conf:/etc/nginx/conf.d
to
- /docker/nginx/conf:/etc/nginx/conf.d:rw
or simply delete it.

>All comments

Found the solution, you have to set the volume :
- /docker/nginx/conf:/etc/nginx/conf.d
to
- /docker/nginx/conf:/etc/nginx/conf.d:rw
or simply delete it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

peperunas picture peperunas  路  4Comments

cadesalaberry picture cadesalaberry  路  3Comments

mroberty8 picture mroberty8  路  3Comments

auzty picture auzty  路  3Comments

Jas2Ma picture Jas2Ma  路  4Comments