From 364005b9dd6bdcc78c26e2f3fc605581c864ddbf Mon Sep 17 00:00:00 2001 From: Mathieu Bruyen Date: Sat, 15 Dec 2018 09:07:12 +0100 Subject: [PATCH] db install process --- Dockerfile | 1 + install-db.php | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 install-db.php diff --git a/Dockerfile b/Dockerfile index 4ceaddc..bcdb0bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,6 +23,7 @@ EXPOSE 80 443 COPY nginx.conf /etc/nginx/conf.d/default.conf COPY ttrss.conf /etc/php7/php-fpm.d/ttrss.conf +COPY install-db.php /var/lib/tt-rss-install/install-db.php ADD https://git.tt-rss.org/fox/tt-rss/archive/18.12.tar.gz /tmp/ttrss.tar.gz RUN tar -xzf /tmp/ttrss.tar.gz -C /var/lib diff --git a/install-db.php b/install-db.php new file mode 100644 index 0000000..56ab799 --- /dev/null +++ b/install-db.php @@ -0,0 +1,26 @@ +query($line); + + if (!$res) { + print_notice("Query: $line"); + print_error("Error: " . implode(", ", $this->pdo->errorInfo())); + } + } +} + +print_notice("Database initialization completed.");