Merge changes from master, PR #280 and resolve conflicts

This commit is contained in:
Khanh Ngo
2018-06-13 11:05:53 +07:00
918 changed files with 1236 additions and 226114 deletions

View File

@ -6,13 +6,21 @@ ENV ENVIRONMENT=${ENVIRONMENT}
WORKDIR /powerdns-admin
RUN apt-get update -y
RUN apt-get install -y apt-transport-https
RUN apt-get install -y locales locales-all
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
RUN apt-get install -y python3-pip python3-dev supervisor
RUN apt-get install -y python3-pip python3-dev supervisor curl
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
# Install yarn
RUN apt-get update -y
RUN apt-get install -y yarn
# lib for building mysql db driver
RUN apt-get install -y libmysqlclient-dev

View File

@ -1,14 +1,19 @@
#!/bin/sh
cd /powerdns-admin
if [ ! -d "/powerdns-admin/migrations" ]; then
/usr/local/bin/flask db init --directory /powerdns-admin/migrations
/usr/local/bin/flask db migrate -m "Init DB" --directory /powerdns-admin/migrations
/usr/local/bin/flask db upgrade --directory /powerdns-admin/migrations
cd /powerdns-admin && ./init_data.py
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
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
yarn install --pure-lockfile
flask assets build
/usr/bin/supervisord -c /etc/supervisord.conf