Moved image building from docker-compose to startup script.

This commit is contained in:
yohan 2020-02-26 17:25:12 +01:00
parent d7d49caeff
commit a88c2bcc67
2 changed files with 9 additions and 3 deletions

View File

@ -5,7 +5,7 @@ services:
coturn: coturn:
container_name: coturn container_name: coturn
image: coturn:$VERSION_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 restart: unless-stopped
network_mode: "host" 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"] 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"]

View File

@ -7,6 +7,12 @@ sudo chmod a-r secret
sudo mv -f secret .env sudo mv -f secret .env
unset VERSION_COTURN unset VERSION_COTURN
VERSION_COTURN=$(git ls-remote https://git.scimetis.net/yohan/docker-coturn.git| head -1 | cut -f 1|cut -c -10) \ 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' sudo -E bash -c 'docker-compose up -d'
rm -rf ~/build