this post was submitted on 20 Oct 2024
1 points (52.4% liked)

Programming

17419 readers
48 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

Hi friends, as promised, I'm back with my second post. I'll be hanging around in the comments for any questions!

In this post, I take a look at a typical deployment process, how long each part of it takes, and then I present a simple alternative that I use which is much faster and perfect for hobbit software.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 13 points 3 weeks ago (2 children)

So it really is that simple: a small bash script, building locally, rsync'ing the changes, and restarting the service. It's just the bare essentials of a deployment. That's how I deploy in 10 seconds.

I'm strongly opposed to local builds on any semi-important or semi-complex production product or system.

Tagged CI release builds give you a lot of important guarantees involved in release concerns.

I'll take the fresh checkout and release build time cost for those consistency and versioned source state guarantees.

[–] [email protected] 2 points 3 weeks ago (1 children)

I would imagine you could run into an issue like this building off an M1 or newer Mac and deploying to a Linux based env. We've run into a bit of an adjustment with our docker image builds where we need to set the buildarch or else it fails to deploy.

Our build times aren't blazingly fast, typically around 4 minutes for npm/yarn build for frontend apps and loading the data to the image and any other extras like composer installs. Best time saving for us was doing a base image for all the dependency junk that we do a nightly on

[–] [email protected] 2 points 3 weeks ago

This was exactly the problem in my last environment. I was the second dev and two more were onboarded after me, but everyone had issues replicating the original dev’s local environment in order to deploy.

First thing I did was set up a basic gitops pipeline. Worked like a charm.