docker icon indicating copy to clipboard operation
docker copied to clipboard

How to update a docker-built container?

Open drwb opened this issue 2 years ago • 4 comments

What are the steps to update a previously built docker container?

I’d imagine an update of the repository git pull origin master ?

a (manual?) review of .env changes?

then somehow updating the database without losing data? perhaps there’s a new schema. this is where I’m conceptually stuck.

I also notice that the docs require the database to be run first, which my existing installation logs suggest is new?

then docker build?

drwb avatar May 22 '22 10:05 drwb

tagging @zomars here. Since the schema update during compilation is very recent, there may be relevant steps for even the non-container build that are documented and can be adapted

krumware avatar May 25 '22 15:05 krumware

Our process would be git pull origin main then yarn then yarn build and yarn start. The build process ensures that DB migrations are ran. IDK how this would translate to the Docker build since I'm not very Docker-savvy.

zomars avatar May 25 '22 15:05 zomars

But the Prisma migrations in the build are safe for existing databases, correct? Wasn't sure if there were any recommendations for upgrading in production and running the build against a shadow db

krumware avatar May 25 '22 16:05 krumware

They should be safe yes

zomars avatar May 25 '22 16:05 zomars