Add possibility to specify Compose file version
This change allows to set the Compose file version in the model instead
of the hardcoded value.
Change-Id: I5f7fb3c0770a48fe6dada54ffb9f925ef6ebd078
diff --git a/README.rst b/README.rst
index deeb54d..ef6b711 100644
--- a/README.rst
+++ b/README.rst
@@ -119,6 +119,7 @@
update: true
environment:
SOMEVAR: somevalue
+ version: "3.1"
service:
db:
image: postgres
diff --git a/docker/files/docker-compose.yml b/docker/files/docker-compose.yml
index fbe8b74..f120327 100644
--- a/docker/files/docker-compose.yml
+++ b/docker/files/docker-compose.yml
@@ -1,4 +1,4 @@
-version: '3'
+version: '{{ compose.version|default("3") }}'
services:
{%- for name, srv in service.iteritems() %}
diff --git a/tests/pillar/client_deploy.sls b/tests/pillar/client_deploy.sls
index 860531a..d6d56ea 100644
--- a/tests/pillar/client_deploy.sls
+++ b/tests/pillar/client_deploy.sls
@@ -6,6 +6,7 @@
enabled: true
environment:
SOMEVAR: somevalue
+ version: 3.3
service:
db:
image: postgres