Is there a better development workflow than rebuilding and redeploying my app after every change?

0
1
Asked By MellowPine47 On

I'm new to deployment and currently stuck in a slow feedback loop. Whenever I change my Compose or Dockerfile configuration to fix an error, I push the changes, wait around 10 minutes for an image to build in a remote CI system, then manually pull and run that image on my server. Often the result is another error, so I repeat the whole process. Is this a normal workflow, or should I be testing changes locally in a way that avoids rebuilding and redeploying the image every time?

2 Answers

Answered By AmberComet62 On

You may also want to investigate a deployment tool that automates pulling and running updated images. It won’t replace a good local development setup, but it can reduce the amount of manual work involved when you actually deploy.

Answered By QuietHarbor8 On

That workflow is much slower than it needs to be, especially during development. Set up a local environment where your source code is mounted into a runtime container, so code changes can be tested without rebuilding and pushing an image each time. Rebuild only when dependencies or the image configuration change. Also check whether your builds are using Docker layer caching, and keep development builds local whenever possible. Timing each step can help identify the biggest bottleneck. Once the application works locally, use the remote build and deployment process for releases rather than every experiment.

MellowPine47 -

That makes sense. I hadn’t considered that building remotely for every small change was mostly wasting time. I’ll look into local development containers, volume mounts, and build caching.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.