Copied to clipboard

Flag this post as spam?

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


  • Aditya 24 posts 128 karma points
    Jun 01, 2018 @ 22:31
    Aditya
    0

    Best practice for deploying a site from Visual Studio to Production Server

    I've gone over tons of blog posts and tried various methods, but I still can't quite get the best way to develop on Visual Studio and then deploy to a server.

    There's always something small that breaks. Umbraco Courier was an option that I used some years ago, but now I see it costs $1500, which is WAY too much for me. Here's what I've tried - if anyone can give me a better way to do this, I'll be very happy!

    1. No Umbraco Cloud - I've tried this out and it works great. However, I am not doing this for a business, and don't want to pay $30 a month for my small blog.

    2. No Courier - See above.

    3. Hosting is not an issue. I have access to Azure through MSDN, as well as an IIS/SQL Server of my own. I can use WebDeploy or Azure Publishing

    My current workflow looks like this

    1. Install UmbracoCMS in a new project in VS 2017.
    2. Set it up locally with SQL CE
    3. Create templates, doctypes etc.
    4. Publish via WebDeploy. I'm including the .sdf file for now.
    5. Use Visual Studio Team services for source control. The .sdf file is always included, so I can rollback to a known good version.

    This workflow works ok because I'm essentially embedding the DB, and moving the entire site back and forth between my local repo and the webserver.

    If I create content on the server, I can download it into Visual Studio, and also download the .sdf file.

    At some point I will migrate to an SQL Server DB, and that's where I'm wondering how to do it. I have two options that I can see

    1. Set my VS Project to use the same database. This keeps everything consistent, but I'll need to be constantly online, and if I make changes that I don't like, I'll have to figure out how to roll back the DB

    2. Set my VS Project to a local DB - this lets me do whatever I want without breaking the live site, but it's a pain to publish. I can upload the files on disk, but how do I upload the DB changes? Also, if I have two DBs, I believe the IDs change and it doesn't necessarily work.

    How do you guys manage your workflows? Any best practices that are a) free, and b) easy for a single developer to implement?

    Ask me any questions you like. Discussing this would be great.

    Thanks

  • Aditya 24 posts 128 karma points
    Jun 01, 2018 @ 22:35
    Aditya
    0

    Just to add - is uSync a good way to do this?

  • Andy Felton 185 posts 484 karma points c-trib
    Jun 02, 2018 @ 07:10
    Andy Felton
    0

    Hi Aditya,

    The setup we have is a follows:

    • AWS EC2s backed by RDS databases
    • Local development machine with SQL Express

    When we want to do any development we download a backup of the database and work locally using that. All document type modifications are done on development machines and we use uSync with this deploying them and code changes to live using MS deploy. We never deploy our development databases to live and instead make content modifications on live only after release.

    This only becomes an issue when you make breaking content changes but without Courier or Umbraco Cloud (as Umbraco Deploy) we've found not better options.

    Thanks Andy

  • Aditya 24 posts 128 karma points
    Jun 02, 2018 @ 17:21
    Aditya
    0

    Thanks for responding. Yeah, that's what I've seen as well - it's not really possible to do doctype changes in live and dev and merge them together (without Courier). Sure, there are ways of doing it, but it will break at some point when I inevitably forget and make a change in live that breaks something in Dev or vice-versa.

    I wanted to make sure I wasn't missing something simple that would make my life easier. Apparently not - even professional developers who are using this commercially have the same issues that I noticed.

  • Andy Felton 185 posts 484 karma points c-trib
    Jun 02, 2018 @ 18:49
    Andy Felton
    0

    You are correct, it comes down to process for us. If it does happen that somebody edit a DocType on Live we can always take the uSync files from live and apply of Dev!

    Andy

Please Sign in or register to post replies

Write your reply to:

Draft