1
0
Fork 0
mirror of https://git.tt-rss.org/fox/ttrss-docker-compose synced 2025-06-09 16:29:52 +02:00

various updates

This commit is contained in:
Andrew Dolgov 2019-11-15 17:42:50 +03:00
parent e38d98dcd4
commit cf2406f6a6
5 changed files with 35 additions and 13 deletions

View file

@ -12,4 +12,9 @@ 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
ARG OWNER_UID
ARG OWNER_GID
RUN mkdir -p /var/www && addgroup -g ${OWNER_GID} app && adduser -D -h /var/www/html -G app -u ${OWNER_UID} app
CMD /startup.sh

View file

@ -1,6 +1,5 @@
#!/bin/sh -ex
OWNER=nobody
DST_DIR=/var/www/html/tt-rss
SRC_REPO=https://git.tt-rss.org/fox/tt-rss.git
@ -15,7 +14,13 @@ else
cd $DST_DIR && git pull origin master
fi
chown -R $OWNER $DST_DIR
if [ ! -d $DST_DIR/plugins.local/nginx_xaccel ]; then
git clone https://git.tt-rss.org/fox/ttrss-nginx-xaccel.git $DST_DIR/plugins.local/nginx_xaccel
else
cd $DST_DIR/plugins.local/nginx_xaccel && git pull origin master
fi
chown -R $OWNER_UID:$OWNER_GID $DST_DIR
chmod +x /etc/periodic/15min/*
for d in cache lock feed-icons; do
@ -30,10 +35,11 @@ if [ ! -s $DST_DIR/config.php ]; then
SELF_URL_PATH=$(echo $SELF_URL_PATH | sed -e 's/[\/&]/\\&/g')
sed \
-e "s/define('DB_HOST'.*/define('DB_HOST','$DB_HOST');/" \
-e "s/define('DB_USER'.*/define('DB_USER','$DB_USER');/" \
-e "s/define('DB_NAME'.*/define('DB_NAME','$DB_NAME');/" \
-e "s/define('DB_PASS'.*/define('DB_PASS','$DB_PASS');/" \
-e "s/define('DB_HOST'.*/define('DB_HOST', '$DB_HOST');/" \
-e "s/define('DB_USER'.*/define('DB_USER', '$DB_USER');/" \
-e "s/define('DB_NAME'.*/define('DB_NAME', '$DB_NAME');/" \
-e "s/define('DB_PASS'.*/define('DB_PASS', '$DB_PASS');/" \
-e "s/define('PLUGINS'.*/define('PLUGINS', 'auth_internal, note, nginx_xaccel');/" \
-e "s/define('SELF_URL_PATH'.*/define('SELF_URL_PATH','$SELF_URL_PATH');/" \
< $DST_DIR/config.php-dist > $DST_DIR/config.php
fi