-
-
Notifications
You must be signed in to change notification settings - Fork 2k
WIP:docker: use alpine flavor of postgres image #687
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
No database upgrade happened on my end and everything works fine after migrating to the new image, but please test this more carefully. |
5debadd
to
b7344fd
Compare
Can someone already running a Docker cluster please test this change (make sure to backup your postgres database first). I noticed this strange behavior on one of my instances (might be unrelated to this change though): @omarroth any idea on what might cause this? |
My only guess would be that duplicate videos are being inserted into the database. Would you mind checking that
|
Unfortunately, I have removed the "broken" database since and this never happened again. postgres was logging lots of
How can an |
If there were already duplicates in the database, then an |
Is this still WIP? From some quick testing it LGTM. |
I'm still not sure / haven't tried to reproduce whether this change is responsible for spoiling the database as described in #687 (comment). Anyone, feel free to test this with a backup of your instance. |
Be careful with postgres and the alpine base image. I had to learn the hard way that the debian based vs the alpine based images are not data-compatible. This can be solved by dumping and re-importing the db but this needs to be documented in upgrade instructions |
b7344fd
to
557ccb1
Compare
Rebased & updated to The upgrade was working fine for me this time, all data was transferred successfully.. |
On a fresh install, just changing the postgres:
image: postgres:10 to: postgres:
image: postgres:10-alpine is working fine. Is there a real need to have code modification to support alpine version of postgres ? |
We don't build our own postgres image anymore. The postgres image can be adjusted in docker-compose.yml on initial deployment. Changing this for everyone who uses the compose file is not such a good idea as it could lead to data corruption. |
This pull request has been automatically locked since there has not been any activity in it in the last 30 days. If you want to tell us about needed or wanted changes or if problems related to this code are discovered, feel free to open an issue or a new pull request. |
Image size reduced by over 68%, from
230MB
down to72.4MB
.Additionally, this seems to free around 2GB of intermediary images.