Re: Data migrations ran multiple times during deploy

2023-01-10 Thread Harris Lapiroff
Thanks, all for the responses! They're helpful, particularly: - Using a separate single service to run migrations - django-syzygy looks interesting and might also solve another issue we've been having lately trying to achieve zero-downtime deploys Best, Harris On Sunday, January 8, 202

Re: Data migrations ran multiple times during deploy

2023-01-08 Thread Aviv Avitan
We experience the same problems and those races are probably inevitable 1. django-syzygy (quroum) may solves this issue as it will use a semaphore to prevent any migrations before seeing "X migrates". this will prevent any races. On the same note, it will introduce migrate --pre which should avo

Re: Data migrations ran multiple times during deploy

2023-01-07 Thread Madhava Raju Sripathi
thank you subscribe my channel @VictoriaPalanki9573974636 On Friday, January 6, 2023 at 6:12:32 PM UTC+5:30 harrisl...@gmail.com wrote: > Hi, all! Curious about how folks do data migrations as we ran into an > issue recently: > > Our production deployment consists of three containers running th

Re: Data migrations ran multiple times during deploy

2023-01-07 Thread quentinsf
Most of our stuff is deployed under Docker Swarm - though it would work with compose or other systems - and typically we have a separate service, using our standard container image for the app but with the command overridden to run 'manage.py migrate'. The swarm is told to run just one replica

Data migrations ran multiple times during deploy

2023-01-06 Thread Harris Lapiroff
Hi, all! Curious about how folks do data migrations as we ran into an issue recently: Our production deployment consists of three containers running the application. When each container comes up it runs a series of startup tasks include `./manage.py migrate`. Usually it's fine to run this whenever