From a88c2bcc670c6c74de828ddcc0f9ce8258f4d520 Mon Sep 17 00:00:00 2001 From: yohan <783b8c87@scimetis.net> Date: Wed, 26 Feb 2020 17:25:12 +0100 Subject: [PATCH] Moved image building from docker-compose to startup script. --- docker-compose.yml | 2 +- start_or_update.sh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 481e2ac..d1c1d6f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: coturn: container_name: coturn image: coturn:$VERSION_COTURN - build: "https://git.scimetis.net/yohan/docker-coturn.git" + #build: "https://git.scimetis.net/yohan/docker-coturn.git" restart: unless-stopped network_mode: "host" command: ["--listening-port", "3478", "--verbose", "--fingerprint", "--use-auth-secret", "--static-auth-secret", "$SECRET", "--realm", "scimetis.net", "--total-quota", "100", "--bps-capacity", "0", "--stale-nonce", "--no-multicast-peers"] diff --git a/start_or_update.sh b/start_or_update.sh index de12d9c..98a5264 100755 --- a/start_or_update.sh +++ b/start_or_update.sh @@ -7,6 +7,12 @@ sudo chmod a-r secret sudo mv -f secret .env unset VERSION_COTURN -VERSION_COTURN=$(git ls-remote https://git.scimetis.net/yohan/docker-coturn.git| head -1 | cut -f 1|cut -c -10) \ - sudo -E bash -c 'docker-compose up -d' +export VERSION_COTURN=$(git ls-remote https://git.scimetis.net/yohan/docker-coturn.git| head -1 | cut -f 1|cut -c -10) +mkdir -p ~/build +git clone https://git.scimetis.net/yohan/docker-coturn.git ~/build/docker-coturn +sudo docker build -t coturn:$VERSION_COTURN ~/build/docker-coturn + +sudo -E bash -c 'docker-compose up -d' + +rm -rf ~/build