From 60b4398e922c70bcc7f0f86c126830afdac4b6a8 Mon Sep 17 00:00:00 2001
From: decentral1se <hi@decentral1.se>
Date: Tue, 16 Mar 2021 09:37:42 +0100
Subject: [PATCH] Add versions and label

---
 abra.sh     | 6 ++++++
 compose.yml | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/abra.sh b/abra.sh
index 10205cd..df38232 100644
--- a/abra.sh
+++ b/abra.sh
@@ -1,3 +1,9 @@
+export ABRA_TYPE_APP_VERSION=5.7.0
+export ABRA_TYPE_APP_DIGEST=408627ce
+
+export ABRA_TYPE_DB_VERSION=10.5
+export ABRA_TYPE_DB_DIGEST=e27cf5bc
+
 export PHP_UPLOADS_CONF_VERSION=v3
 export ENTRYPOINT_CONF_VERSION=v2
 export ENTRYPOINT_MAILRELAY_CONF_VERSION=v1
diff --git a/compose.yml b/compose.yml
index 9581654..97e0d9c 100644
--- a/compose.yml
+++ b/compose.yml
@@ -48,6 +48,7 @@ services:
         #- "traefik.http.routers.${STACK_NAME}.rule=HostRegexp(`{subdomain:.+}.${DOMAIN}`, `${DOMAIN}`)"
         - "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
         - "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
+        - "coop-cloud.${STACK_NAME}.app.version=${ABRA_TYPE_APP_VERSION}-${ABRA_TYPE_APP_DIGEST}"
 
   db:
     image: "mariadb:10.5"
@@ -63,6 +64,9 @@ services:
     secrets:
       - db_password
       - db_root_password
+    deploy:
+      labels:
+        - "coop-cloud.${STACK_NAME}.db.version=${ABRA_TYPE_DB_VERSION}-${ABRA_TYPE_DB_DIGEST}"
 
 networks:
   backend: