|
@@ -1,7 +1,35 @@
|
|
|
-#!/bin/sh
|
|
|
+### Editar el archivo de configuración
|
|
|
+id=$1
|
|
|
+file="fourier-config.json"
|
|
|
+inicio='{\n "device_id":"'
|
|
|
+fin='",\n
|
|
|
+ "basepath":"/var/fourier",\n
|
|
|
+ "bucket": "fourier-6e14d.appspot.com",\n
|
|
|
+ "projectId":"fourier-6e14d",\n
|
|
|
+ "keyFilename":"/etc/Fourier-key.json",\n
|
|
|
+ "installDir":"~/programs",\n
|
|
|
+ "apiSecret": "prueba",\n
|
|
|
+ "firebase": {\n
|
|
|
+ "apiKey": "AIzaSyAH7eXARukgBCLFOfw4-Kl-NatHc-fOA68",\n
|
|
|
+ "authDomain": "fourier-6e14d.firebaseapp.com",\n
|
|
|
+ "databaseURL": "https://fourier-6e14d.firebaseio.com",\n
|
|
|
+ "storageBucket": "fourier-6e14d.appspot.com",\n
|
|
|
+ "messagingSenderId": "1032228035742"\n
|
|
|
+ },\n
|
|
|
+ "receivers_count":16,\n
|
|
|
+ "database": {\n
|
|
|
+ "user": "fourier",\n
|
|
|
+ "password": "Sup3rDuper!",\n
|
|
|
+ "database": "fourier"\n
|
|
|
+ },\n
|
|
|
+ "streamURL": "http://monitor.audiovalid.com:8000"\n
|
|
|
+}'
|
|
|
+json="$inicio$id$fin"
|
|
|
+echo $json > $file
|
|
|
+
|
|
|
###construir imagen ondemand
|
|
|
docker build -t ondemand-$1 .
|
|
|
###prueba
|
|
|
#docker run -it -v /var/fourier:/var/fourier ondemand bash
|
|
|
###produccion
|
|
|
-docker run -d -v /var/fourier:/var/fourier ondemand-$1
|
|
|
+docker run -d -v /var/fourier:/var/fourier ondemand-$1
|