Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • bh 408 posts 1395 karma points
    Apr 07, 2022 @ 14:24
    bh
    0

    Umbraco v9 Deployment Question

    This clip shows the file structure in my website folder on IIS on my server after publishing from VS2022 from my local machine.

    https://www.loom.com/share/0597d03579d44748b467b58a7566968f

    My questions:

    1. Can I have the wwwroot on my local publish to the siteroot on my server instead of siteroot/wwwroot? If I do that will the site still work?

    2. What's up with everything that's normaly in siteroot/bin being in my siteroot? Is there a way to publish them to siteroot/bin? Will it work if I do that?

    3. My Umbraco.sdf and my Media folder are included in my project, but I can't get them to publish when I publish the site. Note: I looked at the "Copy to output directory" setting, and tried all 3 options and that didn't make a difference.

    4. Last one...there's a web.config that gets published to my siteroot. I'd like to modify that file on my local, but I can't find it to modify it before it gets published. I see it in the debug output folder, but i'm publishing the Release. Where can I find the web.config on my local?

    I know it's a lot of questions. But, I ask b/c hopefully it'll help not just me but someone else who's in the same boat asking the same questions as me. Don't feel like you need to answer all 4. If you've got an answer for even one of my questions that'd be much appreciated. Thanks in advance!

  • Paul Wright (suedeapple) 277 posts 704 karma points
    Apr 07, 2022 @ 17:12
    Paul Wright (suedeapple)
    1

    As far as I'm aware..

    1) You need to "BUILD" the site, so just updating the wwwroot files will not give you all the newly compiled code. Files in wwwroot are merely your static assets such as JS/CSS/Images/Media

    2) Upload everything. Everything gets shoved into a single publish directory. That's just the way CORE works

    3) Not sure on this one. I think there some documentation on it in

    4) Just keep a copy of your desired Web.Config File for live - You could then extend a build command to include this file into the final build for a Production site. This is similar to how I handle Rewrites, and security aspects, which are on the LIVE site, but not on my Local publish.

    Update.

    For most situations, you can also alter the startup.cs file, and decide what may get included on a Development build, or when Building for production.

    As always with Umbraco/.NET - there's plenty of ways to do the same thing. It's just a matter what fits in with your workflow, and what you understand.

  • bh 408 posts 1395 karma points
    Apr 07, 2022 @ 17:23
    bh
    0

    I figured out on #3 that right-click publish file does work. Still not sure though why it doesn't publish when I publish the rest of the site.

  • Paul Wright (suedeapple) 277 posts 704 karma points
    Apr 07, 2022 @ 17:28
    Paul Wright (suedeapple)
    0

    I cant remember where I saw it - It might be in the PROJECT file itself, but I think it might be the same reason why the Media Folder doesn't get added to a publish, even if you explicitly include it to be in a publish.

    I think the mindset in most situations, your media would be in cloud blob storage.

    There's a few people who have asked about it on the FORUM, but not seen any full explanations on how to override this behaviour.

    Same goes with your DB - the local DB is probably only good for local dev, rather than something you would GO LIVE with on production. I could be wrong.

  • bh 408 posts 1395 karma points
    Apr 07, 2022 @ 17:29
    bh
    0

    Yep...same thing with Media folder you're right. I'm having to right-click publish that as well.

  • bh 408 posts 1395 karma points
    Apr 07, 2022 @ 17:31
    bh
    0

    So basically what I learned here today is I'm not alone. Good to know. Thanks @PaulWright.

  • Paul Wright (suedeapple) 277 posts 704 karma points
    Apr 07, 2022 @ 17:33
    Paul Wright (suedeapple)
    0

    Yep the same "headaches" as everyone else.

    It's merely because, people are just starting to get to grips with thing, that people are now finding out, it's a complete overhaul of workflow.

    Gone are the days of just updating a DLL, and FTP'ing it up. It's going to be a stickler for a lot of companies, and I can see a lot more Umbraco sites being built on version 8, for many more years to come.

  • Ambert van Unen 175 posts 817 karma points c-trib
    Apr 07, 2022 @ 19:17
    Ambert van Unen
    0

    Its good that companies finally start to work with pipelines, much safer and far less prone for errors during deployments! ;-)

  • Paul Wright (suedeapple) 277 posts 704 karma points
    Apr 07, 2022 @ 20:37
    Paul Wright (suedeapple)
    0

    Depends what you are developing, how many sites you are creating and the time/cost benefits.

    I agree - That CORE simply wont let you publish something that does not BUILD. So can be happy knowing what you "finally output" should just work on what ever WebServer you throw it at. No more worrying if the Live Environment has "xyz" pre-installed.

    For the majority of "brochure/hobby" developer-front-enders out there - I can see a lot turning to alternate JAMstacks which dont have all these extra overheads, or the negate the need for heavy testing. (Merely working on the "fire and forget" principles)

  • Phung Dao 22 posts 102 karma points
    Jan 11, 2023 @ 08:56
    Phung Dao
    0

    JamStack doesn't officially support but i added the xstatic package and deployed to netlify.

    Amazing work Sam Mullins!

Please Sign in or register to post replies

Write your reply to:

Draft