2016-08-08 08:40:14 +00:00
|
|
|
#!/bin/bash
|
2017-01-12 10:29:02 +00:00
|
|
|
set -e
|
2016-10-19 06:32:00 +00:00
|
|
|
cp tests/docker-compose.test.yml make/.
|
2016-06-15 03:19:10 +00:00
|
|
|
|
2017-03-30 03:04:09 +00:00
|
|
|
mkdir -p /etc/ui
|
2018-04-08 15:43:45 +00:00
|
|
|
cp make/common/config/ui/private_key.pem /etc/ui/
|
2016-06-07 04:19:48 +00:00
|
|
|
|
2018-02-02 08:17:58 +00:00
|
|
|
mkdir src/ui/conf
|
2018-04-08 15:43:45 +00:00
|
|
|
cp make/common/config/ui/app.conf src/ui/conf/
|
2018-04-19 05:52:18 +00:00
|
|
|
if [ "$(uname)" == "Darwin" ]; then
|
|
|
|
IP=`ifconfig en0 | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'`
|
|
|
|
else
|
|
|
|
IP=`ip addr s eth0 |grep "inet "|awk '{print $2}' |awk -F "/" '{print $1}'`
|
|
|
|
fi
|
2017-11-15 06:49:14 +00:00
|
|
|
echo "server ip is "$IP
|
2018-04-27 09:27:12 +00:00
|
|
|
sed -i -r "s/POSTGRESQL_HOST=postgresql/POSTGRESQL_HOST=$IP/" make/common/config/adminserver/env
|
2017-11-15 06:49:14 +00:00
|
|
|
sed -i -r "s|REGISTRY_URL=http://registry:5000|REGISTRY_URL=http://$IP:5000|" make/common/config/adminserver/env
|
2017-01-12 10:29:02 +00:00
|
|
|
sed -i -r "s/UI_SECRET=.*/UI_SECRET=$UI_SECRET/" make/common/config/adminserver/env
|
2017-02-15 07:25:59 +00:00
|
|
|
|
2017-11-15 06:49:14 +00:00
|
|
|
chmod 777 /data/
|