Closed zypA13510 closed 4 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
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.
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.
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.
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.
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.
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.
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.)