From 47795496b5b1aef65d09225a9d47ea2645b7d60b Mon Sep 17 00:00:00 2001 From: Tom Wiesing Date: Tue, 14 Jul 2020 16:42:17 +0200 Subject: [PATCH] Store slug with each barrel --- distillery/provision.sh | 1 + distillery/resources/compose/barrel/docker-compose.yml | 4 ++++ distillery/resources/templates/docker-env/barrel | 1 + 3 files changed, 6 insertions(+) diff --git a/distillery/provision.sh b/distillery/provision.sh index 12cbd5f..16231e2 100755 --- a/distillery/provision.sh +++ b/distillery/provision.sh @@ -78,6 +78,7 @@ log_info " => Writing configuration file" load_template "docker-env/barrel" \ "REAL_PATH" "${INSTANCE_DATA_DIR}" \ "VIRTUAL_HOST" "${INSTANCE_DOMAIN}" \ + "SLUG" "${SLUG}" \ "LETSENCRYPT_HOST" "${LETSENCRYPT_HOST}" \ "LETSENCRYPT_EMAIL" "${LETSENCRYPT_EMAIL}" \ > "$INSTANCE_BASE_DIR/.env" diff --git a/distillery/resources/compose/barrel/docker-compose.yml b/distillery/resources/compose/barrel/docker-compose.yml index 62320bf..5c0df32 100644 --- a/distillery/resources/compose/barrel/docker-compose.yml +++ b/distillery/resources/compose/barrel/docker-compose.yml @@ -13,6 +13,10 @@ services: LETSENCRYPT_HOST: ${LETSENCRYPT_HOST} LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL} + # label it with the current slug + labels: + eu.wiss-ki.barrel.slug: ${SLUG} + # the volumes to volumes: - ${REAL_PATH}/.composer:/var/www/.composer diff --git a/distillery/resources/templates/docker-env/barrel b/distillery/resources/templates/docker-env/barrel index d137b6b..2c881ea 100644 --- a/distillery/resources/templates/docker-env/barrel +++ b/distillery/resources/templates/docker-env/barrel @@ -1,5 +1,6 @@ REAL_PATH=${REAL_PATH} +SLUG=${SLUG} VIRTUAL_HOST=${VIRTUAL_HOST} LETSENCRYPT_HOST=${LETSENCRYPT_HOST}