Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When label is used, in logs container ID is used instead of container name #982

Open
KES777 opened this issue Nov 5, 2022 · 0 comments
Open

Comments

@KES777
Copy link

KES777 commented Nov 5, 2022

When labels is used:

nginx-acme-1  | Info: running acme-companion version v2.2.1
nginx-acme-1  | Reloading nginx proxy (8263472346723467248264723846872634283746)...

When ENV or volumes_from is used:
nginx-acme-1 | Reloading nginx proxy (nginx-proxy-1)...

If you can provide a script or docker-compose file that reproduces the problems, that is very helpful.
version: '3.9'


name: nginx

networks:
  office-net:
    external: true


services:
  proxy:
    restart: always
    image: jwilder/nginx-proxy
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - certs:/etc/nginx/certs:ro
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /var/run/docker.sock:/tmp/docker.sock:ro
    environment:
      ENABLE_IPV6: true
    # labels:
    #   - "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
    networks:
      office-net:

  acme:
    restart: always
    image: nginxproxy/acme-companion
    depends_on:
      - proxy
    volumes:
      - acme.sh:/etc/acme.sh
      - certs:/etc/nginx/certs:rw
      - vhost.d:/etc/nginx/vhost.d
      - html:/usr/share/nginx/html
      - /var/run/docker.sock:/var/run/docker.sock:ro
    # volumes_from:
    #   - nginx-proxy
    environment:
      DEFAULT_EMAIL: admin@office
      NGINX_PROXY_CONTAINER: nginx-proxy-1
    networks:
       office-net:


volumes:
  certs:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '${PWD}/volumes/certs'
  vhost.d:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '${PWD}/volumes/vhost.d'
  html:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '${PWD}/volumes/html'
  acme.sh:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '${PWD}/volumes/acme.sh'

It would be nice, if nginx-proxy will display container name for all cases.

@buchdag buchdag transferred this issue from nginx-proxy/nginx-proxy Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant