WeblateOrg / docker-compose

Docker compose for Weblate
https://docs.weblate.org/en/latest/admin/deployments.html#docker
GNU General Public License v3.0
79 stars 64 forks source link

Downgrade compose file version to 2.2 #11

Closed zypA13510 closed 4 years ago

zypA13510 commented 5 years ago

For us CentOS 7 users, docker shipped in CentOS-Extras is 1.13, and docker-compose shipped in EPEL is 1.18, that gives us a maximum compose file version of 2.2.

Fortunately, the compose file used none of the newer feature or syntax. Simply downgrading the compose file version will work.

This change will make the compose file work out-of-the-box on CentOS 7. Meanwhile it should still work on newer docker and compose version.

(Online editing limited to one file per commit, please squash and use the first message.)

nijel commented 5 years ago

Can you please also fix tests? These are currently failing with:

Version mismatch: file ./docker-compose.yml specifies version 2.0 but extension file ./docker-compose.override.yml uses version 3.0

See https://travis-ci.com/WeblateOrg/docker-compose/builds/133324935

zypA13510 commented 5 years ago

Yes, I saw it too.

It would be a breaking change though, people with existing version 3 override will need to change their override to version 2 (if they want to pull a newer compose file from this repo) and stop using newer syntax.

Another strategy is to maintain another branch e.g. compose-2.x. I'm not sure which way to go.

zypA13510 commented 5 years ago

This also needs to be updated: https://github.com/WeblateOrg/weblate/blob/master/docs/admin/install/docker.rst

I think having a separate branch and adding instruction for older docker versions may be a better idea.

nijel commented 5 years ago

The version 3 is needed for compatibility with Docker swarm, see https://github.com/WeblateOrg/docker/issues/65 and it works for most users, so we should probably stick with that.

Having additional branch, just for 2.x will probably lead to not updating it - the compose file updates are not that frequent and the extra branch will be easily forgotten.

zypA13510 commented 5 years ago

Ok, what about this: I'll look into the possibility of setting up GitHub action to automatically open a PR to 2.x branch when master is pushed to? This will serve as a reminder to update 2.x branch, and it will be less likely to be forgotten.

If it's good for you I'll start working on it.

nijel commented 5 years ago

That should work. Though I'm still not sure if it's worth of the effort - in the end this is just about changing one line in the file.

stale[bot] commented 4 years ago

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.