From 9b7ed2f5e0429bf4952e5ac00186de1e813e5eba Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Sun, 3 Feb 2019 22:00:37 +0100 Subject: [PATCH] Added pulling cron image from git. --- docker-compose.yml | 5 +++-- start_or_update.sh | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6f98284..7fded96 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "2.1" services: reverse-proxy: - image: reverse-proxy:$VERSION + image: reverse-proxy:$VERSION_PROXY build: "https://git.scimetis.net/yohan/docker-reverse-proxy.git" restart: always ports: @@ -17,7 +17,8 @@ services: - reverse-proxy_letsencrypt:/etc/letsencrypt:Z cron: - image: cron + image: cron:$VERSION_CRON + build: "https://git.scimetis.net/yohan/docker-cron.git" restart: always network_mode: "host" volumes: diff --git a/start_or_update.sh b/start_or_update.sh index 4fc3e35..3b81bc8 100755 --- a/start_or_update.sh +++ b/start_or_update.sh @@ -1,5 +1,8 @@ #!/bin/bash sudo chown root. crontab # --force-recreate is used to recreate container when crontab file has changed -unset VERSION; VERSION=$(git ls-remote ssh://git@git.scimetis.net:2222/yohan/docker-reverse-proxy.git| head -1 | cut -f 1|cut -c -10) sudo -E bash -c 'docker-compose up -d --force-recreate' +unset VERSION_PROXY VERSION_CRON +VERSION_PROXY=$(git ls-remote ssh://git@git.scimetis.net:2222/yohan/docker-reverse-proxy.git| head -1 | cut -f 1|cut -c -10) \ +VERSION_CRON=$(git ls-remote ssh://git@git.scimetis.net:2222/yohan/docker-cron.git| head -1 | cut -f 1|cut -c -10) \ + sudo -E bash -c 'docker-compose up -d --force-recreate'