Some folks on the internet were interested in how I had managed to ditch Docker for local development. This is a slightly overdue write up on how I typically do things now with Nix, Overmind and Just.

  • Digital Mark
    link
    fedilink
    English
    -811 months ago

    I know you won’t believe this, but you don’t need any of these GTOS (giant towers of shit) to write & ship code. “Replace one GTOS with another” is a horizontal move to still using a GTOS.

    You can just install the dev tools you need, write code & libraries yourself, or maybe download one. If you don’t go crazy with the libraries, you can even tell a team “here’s the 2 or 3 things you need” and everyone does it themselves. I know Make is scary, with the mandatory tabs, but you can also just compile with a shell script.

    Deployment is packing it up in a zip and unzipping it on your server.

    • @[email protected]
      link
      fedilink
      English
      911 months ago

      Try to develop on a system that just has node16 3 different projects at the same time that each require different node versions. Nix rocks.

      • @sip
        link
        English
        011 months ago

        nvm

        • @[email protected]
          link
          fedilink
          English
          311 months ago

          And now these need different GCC compilers. And building should be easy and reproducible.

          • @sip
            link
            English
            -111 months ago

            If your app behaves differently based on the GCC version the same node version has been compiled, there’s a fuck-up in there.

            • @[email protected]
              link
              fedilink
              English
              111 months ago

              No, I mean my app has a node and an C part, just AS an example. Could also be Java vor PHP.

              • @sip
                link
                English
                111 months ago

                ahh, I see. I guess you had to do a bit more work to ensure everything builds with the same versions.

    • JeezyOP
      link
      fedilink
      English
      611 months ago

      Lot’s of (incorrect) assumptions here and generally a very poorly worded post that doesn’t make any attempt to engage in good faith. These are the reasons for what I believe is my very first down-vote of a comment on Lemmy.

      • Digital Mark
        link
        fedilink
        English
        111 months ago

        You’re advocating switching to another OS with a complex package manager, to avoid using a package manager that’s basically a whole new OS. Giant Tower of Shit may be too generous for that.

        But I was of course correct, I said you wouldn’t believe it.

        • @yogsototh
          link
          English
          911 months ago

          nix does not need nixOS to run but is a complex package manager. At least for me, it doesn’t seem more complex than docker ecosystem.

          I personally use nix to take care of downloading compatible dependencies in isolation for me. And the rest of the code is really, just basic script shell or Makefile too.

          I also could add a fancy mergeShells function I have written in nix to support a docker-compose-like composition of nix-shell files. But you could go a very long way with nix before you even want to do something like this.

        • JeezyOP
          link
          fedilink
          English
          311 months ago

          Tutorial != advocation. As I said, no attempt to engage in good faith.

    • @zygo_histo_morpheus
      link
      English
      211 months ago

      Sometimes you need complex tools for complex problems. We just have a homegrown GTOS at my work instead, I wish we had something that made as much sense as Nix!