Add Ushahidi mobile app support config, closes #133
This commit is contained in:
parent
d40cbe6616
commit
a50ca2e067
@ -157,6 +157,9 @@
|
|||||||
<a href="https://itunes.apple.com/us/app/ushahidi-mobile/id1205994516?mt=8"><img src="img/ios.png" class="ico" alt="IOS">IOS 9.0 a vyšší</a><br>
|
<a href="https://itunes.apple.com/us/app/ushahidi-mobile/id1205994516?mt=8"><img src="img/ios.png" class="ico" alt="IOS">IOS 9.0 a vyšší</a><br>
|
||||||
<a href="https://play.google.com/store/apps/details?id=com.ushahidi.mobile"><img src="img/android.png" class="ico" alt="Android">Android 4.4 a vyšší</a>
|
<a href="https://play.google.com/store/apps/details?id=com.ushahidi.mobile"><img src="img/android.png" class="ico" alt="Android">Android 4.4 a vyšší</a>
|
||||||
</p>
|
</p>
|
||||||
|
<ul>
|
||||||
|
<li><strong>URL:</strong> <span class="clienturl"></span></li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="c" id="sms-sync-gateway">
|
<div class="c" id="sms-sync-gateway">
|
||||||
|
@ -17,6 +17,7 @@ envsubst <${SOURCE_DIR}/createdb.sql | docker exec -i mariadb mysql
|
|||||||
mkdir -p /srv/ushahidi/conf /srv/ushahidi/data
|
mkdir -p /srv/ushahidi/conf /srv/ushahidi/data
|
||||||
chown 8014:8014 /srv/ushahidi/data
|
chown 8014:8014 /srv/ushahidi/data
|
||||||
envsubst <${SOURCE_DIR}/srv/ushahidi/conf/env >/srv/ushahidi/conf/env
|
envsubst <${SOURCE_DIR}/srv/ushahidi/conf/env >/srv/ushahidi/conf/env
|
||||||
|
cp ${SOURCE_DIR}/srv/ushahidi/conf/config.json /srv/ushahidi/conf/config.json
|
||||||
cp ${SOURCE_DIR}/srv/ushahidi/update-ip.sh /srv/ushahidi/update-ip.sh
|
cp ${SOURCE_DIR}/srv/ushahidi/update-ip.sh /srv/ushahidi/update-ip.sh
|
||||||
|
|
||||||
# Populate database
|
# Populate database
|
||||||
@ -42,4 +43,4 @@ cp ${SOURCE_DIR}/etc/periodic/15min/ushahidi /etc/periodic/15min/ushahidi
|
|||||||
|
|
||||||
# Add portal application definition
|
# Add portal application definition
|
||||||
portal-app-manager ushahidi "https://{host}:8414/" "${USHAHIDI_ADMIN_USER}" "${USHAHIDI_ADMIN_PWD}"
|
portal-app-manager ushahidi "https://{host}:8414/" "${USHAHIDI_ADMIN_USER}" "${USHAHIDI_ADMIN_PWD}"
|
||||||
portal-app-manager ushahidi-mobile
|
portal-app-manager ushahidi-mobile -p clienturl "{host}:8814"
|
||||||
|
@ -19,6 +19,7 @@ start() {
|
|||||||
--link postfix \
|
--link postfix \
|
||||||
-p 127.0.0.1:8014:8014 \
|
-p 127.0.0.1:8014:8014 \
|
||||||
-v /srv/ushahidi/conf/env:/srv/ushahidi/platform/.env \
|
-v /srv/ushahidi/conf/env:/srv/ushahidi/platform/.env \
|
||||||
|
-v /srv/ushahidi/conf/config.json:/srv/ushahidi/config.json \
|
||||||
-v /srv/ushahidi/data:/srv/ushahidi/platform/application/media/uploads \
|
-v /srv/ushahidi/data:/srv/ushahidi/platform/application/media/uploads \
|
||||||
ushahidi
|
ushahidi
|
||||||
}
|
}
|
||||||
|
6
ushahidi/srv/ushahidi/conf/config.json
Normal file
6
ushahidi/srv/ushahidi/conf/config.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"backend_url": "http://127.0.0.1/platform",
|
||||||
|
"client_id": "ushahidiui",
|
||||||
|
"client_secret": "35e7f0bca957836d05ca0492211b0ac707671261",
|
||||||
|
"google_analytics_id": "AIzaSyBvIF3D550tlpL6o1xRrDurGo-81VhHlOw"
|
||||||
|
}
|
@ -1,5 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
URL=$(ip route get 1 | awk '{print $NF;exit}')
|
URL=$(ip route get 1 | awk '{print $NF;exit}')
|
||||||
FULL_URL='\\\"https:\\\\/\\\\/'${URL}:8413'\\\\/platform\\\\/api\\\\/v3\\\\/config\\\\/data-provider\\\"'
|
|
||||||
|
sed -i "s|^ \"backend_url\".*| \"backend_url\": \"http://${URL}:8814/platform\",|" /srv/ushahidi/conf/config.json
|
||||||
|
|
||||||
|
FULL_URL='\\\"https:\\\\/\\\\/'${URL}:8414'\\\\/platform\\\\/api\\\\/v3\\\\/config\\\\/data-provider\\\"'
|
||||||
echo 'UPDATE `config` SET `config_value` = "'${FULL_URL}'" WHERE `group_name` LIKE "data-provider" AND `config_key` LIKE "url";' | docker exec -i mariadb mysql ushahidi
|
echo 'UPDATE `config` SET `config_value` = "'${FULL_URL}'" WHERE `group_name` LIKE "data-provider" AND `config_key` LIKE "url";' | docker exec -i mariadb mysql ushahidi
|
||||||
|
Loading…
Reference in New Issue
Block a user