schenkd / nginx-ui

Nginx UI allows you to access and modify the nginx configurations files without cli.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

traefik integration with prefixpath /YOUR_PREFIX_PATH/nginx-ui

opened this issue · comments

Hi @schenkd ,

Hope you are all well !

I wanted to integrate your great nginx-ui with traefik but I have a problem with the relative link to the logo and css.

Is it possible to add an env variable for adding a prefix before these assets in order to allow such integration ?

Here is an excerpt of my docker-compose:

  nginx-ui:
    image: nginx-ui:alpine-py3.7
    container_name: nginx-ui
    build:
      context: .docker/nginx-ui
      dockerfile: Dockerfile    
    expose:
    - 8080
    hostname: nginx-ui
    networks:
    - internal
    - web
    labels:
    - 'traefik.enable=true'
    - "traefik.docker.network=web"
    - 'traefik.http.routers.nginx-ui.rule=Host(`xxx-xxxx.xxx-xxxxxxx.com`) && PathPrefix(`/devops/nginx-ui`)'
    - 'traefik.http.routers.nginx-ui.tls=true'
    - "traefik.http.routers.nginx-ui.tls.certresolver=letsencrypt"
    - 'traefik.http.routers.nginx.priority=1'
    - "traefik.http.routers.nginx-ui.entrypoints=https"
    - "traefik.http.services.nginx-ui.loadbalancer.server.port=8080"  
    - "traefik.http.routers.nginx-ui.middlewares=global-compress@file"
    - "traefik.http.routers.nginx-ui.middlewares=chain-regex-prefix@file"
    - "traefik.http.routers.nginx-ui.middlewares=nginx-ui-stripprefix@docker"
    - "traefik.http.middlewares.nginx-ui-stripprefix.stripprefix.prefixes=/devops/nginx-ui"
    volumes:
    - ./shared/config/nginx:/etc/nginx/conf.d
    command: ["--http", "0.0.0.0:8080", "--wsgi-file", "wsgi.py", "--callable", "app", "--processes", "1", "--threads", "8"]

Is it possible to add it easily, if yes, that would be awesome :-)

Ps. can we make them absolute ? would be easier, no ?

Cheers,
Luc Michalski