2018-04-17 21:21:42 +07:00
|
|
|
#!/bin/sh
|
2018-06-11 14:12:04 +07:00
|
|
|
|
2018-06-10 15:16:28 +02:00
|
|
|
cd /powerdns-admin
|
2018-06-13 11:05:53 +07:00
|
|
|
|
2018-06-11 14:12:04 +07:00
|
|
|
if [ ! -d "/powerdns-admin/migrations" ]; then
|
2018-06-13 11:05:53 +07:00
|
|
|
flask db init --directory /powerdns-admin/migrations
|
|
|
|
flask db migrate -m "Init DB" --directory /powerdns-admin/migrations
|
|
|
|
flask db upgrade --directory /powerdns-admin/migrations
|
|
|
|
./init_data.py
|
2018-06-11 14:12:04 +07:00
|
|
|
|
|
|
|
else
|
|
|
|
/usr/local/bin/flask db migrate -m "Upgrade BD Schema" --directory /powerdns-admin/migrations
|
|
|
|
/usr/local/bin/flask db upgrade --directory /powerdns-admin/migrations
|
|
|
|
fi
|
|
|
|
|
2018-06-10 15:16:28 +02:00
|
|
|
yarn install --pure-lockfile
|
2018-06-13 11:05:53 +07:00
|
|
|
flask assets build
|
2018-06-10 15:16:28 +02:00
|
|
|
|
2018-04-17 21:21:42 +07:00
|
|
|
/usr/bin/supervisord -c /etc/supervisord.conf
|