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

traefik integration with prefixpath /YOUR_PREFIX_PATH/nginx-ui #38

Open
ghost opened this issue Dec 10, 2020 · 0 comments
Open

traefik integration with prefixpath /YOUR_PREFIX_PATH/nginx-ui #38

ghost opened this issue Dec 10, 2020 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 10, 2020

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

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

0 participants