s

    Sam Cook

    1 year ago
    @znicholasbrown @Kevin Kho Has there been any progress on this issue? My team would very much like to upgrade our UI instance and this is a big blocker at the moment. https://github.com/PrefectHQ/ui/issues/861
    nicholas

    nicholas

    1 year ago
    Hi @Sam Cook - that issue should be resolved (looks like it didnโ€™t get closed though)z have you tried on the latest version of Core?
    s

    Sam Cook

    1 year ago
    Oh, sweet! Let me update my test bed and see how that's looking
    I updated to the latest version and I still see the issue. The root page is served under the correct root path, but follow on pages still do not respect the set root path.
    nicholas

    nicholas

    1 year ago
    Interesting, I was under the impression the updated nginx image would fix this
    s

    Sam Cook

    1 year ago
    I cracked open the index html, and there's a lot of references like
    <link rel="stylesheet" href="/fonts/fonts.css">
    I'm guessing the hard links are causing direct access to the root. Maybe simply changing to something like
    <link rel="stylesheet" href="./fonts/fonts.css">
    might fix it. I can try to update in the pod, but I'm guessing that pops up a lot in the embedded JS files as well
    nicholas

    nicholas

    1 year ago
    Yeah it would cause those sources are coming from a few different places, including webpack and our own scripts
    s

    Sam Cook

    1 year ago
    The last workable version I used I just hardcoded my prefix for the webpack build and built a bespoke image, but since the FA-PRO inclusion I can't build locally anymore
    nicholas

    nicholas

    1 year ago
    yeah that tracks, i'm gonna try to solve this today so we can close that ticket
    s

    Sam Cook

    1 year ago
    Thanks so much! 10/10 customer service. I should leave a Yelp review lol
    Kevin Kho

    Kevin Kho

    1 year ago
    I know youโ€™re joking but if ever you have an Azure account, we take reviews in the Azure Marketplace lol
    nicholas

    nicholas

    1 year ago
    On further investigation, I don't think this will be possible to fix on our end - the reason is that relative urls (which is the only way we can do this without requiring a full rebuild of the application on every server start) break application chunk loading because we use native browser
    history.pushState
    spec to prevent full page reloads when the application routes. An workaround to this would be to use a custom nginx config in your container with a proxy pass to route requests to the correct locatione
    s

    Sam Cook

    1 year ago
    For security reasons I can't put a default route to the server level pointing to the Prefect UI, so that's not going to work out since I can't route to the container without a prefix. Is it at all feasible for me to build a ui image with the prefix route set? The only thing stopping me now is premium FA assets
    nicholas

    nicholas

    1 year ago
    Hm yes and no. You can build the UI image just fine by replacing the couple of references of
    fontawesome-pro
    with
    fontawesome-free
    without any license... however that will break instances in the UI where we use special icons. I'm looking into how we might remove that download need altogether to let you pre-build everything if needed
    while of course not needing to change every icon we use ๐Ÿ˜›
    s

    Sam Cook

    1 year ago
    I wonder if there's a way I can take the existing built image and do a rebuild using the existing fa-pro as a cache? Maybe a minimal two stage build where I just pull the fa files to the second stage
    nicholas

    nicholas

    1 year ago
    oof that sounds messy to maintain tbh
    s

    Sam Cook

    1 year ago
    oh, horrendously
    nicholas

    nicholas

    1 year ago
    i think i've actually found a way to include everything we need in the project by default, so we don't need to pull the FA icons in at all, they'll already be there
    which would let you do whatever you'd like with the project
    s

    Sam Cook

    1 year ago
    oh, that would be amazing
    nicholas

    nicholas

    1 year ago
    ok it looks like at least that's a change that we'll be able to push through, i've got a demo of this working locally
    Btw this has been merged and should be released this week
    s

    Sam Cook

    1 year ago
    Thanks for this! I just got my local build working, only had to do a little fiddling to get everything working. Boy is that not a quick build process.
    nicholas

    nicholas

    1 year ago
    That's why we removed it from the normal startup ๐Ÿ˜ž
    Luca Schneider

    Luca Schneider

    1 year ago
    Hi all, has this been fixed and pushed ? Also struggling to use UI behind a proxy. Thanks
    s

    Sam Cook

    1 year ago
    @Luca Schneider There's no official fix for putting the UI behind a proxy, but my build is on Dockerhub and you can use it. The path prefix is hardcoded to
    /prefectui/
    , though.https://hub.docker.com/repository/docker/majikman111/prefect-ui-proxy