diff --git a/app/Dockerfile b/app/Dockerfile index 4a33f76..acb263b 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -5,11 +5,11 @@ RUN apk add --no-cache php7 php7-fpm \ php7-pdo php7-gd php7-pgsql php7-pdo_pgsql php7-mbstring \ php7-intl php7-xml php7-curl php7-session \ php7-dom php7-fileinfo php7-json \ - git postgresql-client dcron sudo + php7-pcntl php7-posix \ + git postgresql-client sudo ADD startup.sh / ADD index.php / -ADD scripts/update /etc/periodic/15min/ RUN sed -i.bak 's/^listen = 127.0.0.1:9000/listen = 9000/' /etc/php7/php-fpm.d/www.conf diff --git a/app/scripts/update b/app/scripts/update deleted file mode 100755 index e311565..0000000 --- a/app/scripts/update +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -DST_DIR=/var/www/html/tt-rss - -if [ -s $DST_DIR/config.php ]; then - sudo -u nobody $DST_DIR/update.php --feeds -fi diff --git a/app/startup.sh b/app/startup.sh index a56143e..768a65e 100755 --- a/app/startup.sh +++ b/app/startup.sh @@ -32,7 +32,6 @@ else fi chown -R $OWNER_UID:$OWNER_GID $DST_DIR -chmod +x /etc/periodic/15min/* for d in cache lock feed-icons; do chmod -R 777 $DST_DIR/$d @@ -69,7 +68,5 @@ else -i.bak $DST_DIR/config.php fi -crond & - exec /usr/sbin/php-fpm7 -F diff --git a/docker-compose.yml b/docker-compose.yml index 4b769a2..ca18b4b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,6 +35,21 @@ services: depends_on: - db + updater: + build: + context: + ./app + args: + - OWNER_UID=${OWNER_UID} + - OWNER_GID=${OWNER_GID} + restart: unless-stopped + volumes: + - app:/var/www/html + depends_on: + - app + user: app + command: "php /var/www/html/tt-rss/update_daemon2.php" + web: build: ./web restart: unless-stopped