summaryrefslogtreecommitdiff
path: root/Docker
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-01-06 12:19:26 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-01-06 12:19:26 +0100
commita26eff8a2084a779959f5bef96a4bc72c7ec6ab7 (patch)
tree03e7f8ebef3fcfc67018e19034fbbb841d9dc6bf /Docker
parent30327efecd4fa7f4131cd0d7a5ac80b460af95d1 (diff)
parent15d74d934708896706278574af159a9dcb3a4313 (diff)
Merge branch 'FreshRSS/dev' into FreshRSS/dev-1.14.0
Diffstat (limited to 'Docker')
-rw-r--r--Docker/Dockerfile13
-rw-r--r--Docker/README.md21
-rwxr-xr-xDocker/entrypoint.sh2
3 files changed, 28 insertions, 8 deletions
diff --git a/Docker/Dockerfile b/Docker/Dockerfile
index 2a25e567d..52ac5f2fc 100644
--- a/Docker/Dockerfile
+++ b/Docker/Dockerfile
@@ -2,15 +2,14 @@ FROM alpine:3.8
RUN apk add --no-cache \
apache2 php7-apache2 \
- php7 php7-curl php7-intl php7-mbstring php7-xml php7-zip \
+ php7 php7-curl php7-gmp php7-intl php7-mbstring php7-xml php7-zip \
php7-ctype php7-dom php7-fileinfo php7-iconv php7-json php7-session php7-simplexml php7-xmlreader php7-zlib \
php7-pdo_sqlite php7-pdo_mysql php7-pdo_pgsql
-ENV FRESHRSS_ROOT /var/www/FreshRSS
-RUN mkdir -p ${FRESHRSS_ROOT} /run/apache2/
-WORKDIR ${FRESHRSS_ROOT}
+RUN mkdir -p /var/www/FreshRSS /run/apache2/
+WORKDIR /var/www/FreshRSS
-COPY . ${FRESHRSS_ROOT}
+COPY . /var/www/FreshRSS
COPY ./Docker/*.Apache.conf /etc/apache2/conf.d/
RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
@@ -21,8 +20,8 @@ RUN rm -f /etc/apache2/conf.d/languages.conf /etc/apache2/conf.d/info.conf \
/etc/apache2/httpd.conf && \
sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" \
/etc/apache2/httpd.conf && \
- echo "17,37 * * * * php ${FRESHRSS_ROOT}/app/actualize_script.php 2>&1 | tee /tmp/FreshRSS.log" >> \
- /var/spool/cron/crontabs/www-data
+ echo "17,37 * * * * su apache -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" >> \
+ /var/spool/cron/crontabs/root
ENV CRON_MIN ''
ENTRYPOINT ["./Docker/entrypoint.sh"]
diff --git a/Docker/README.md b/Docker/README.md
index 6b3871c6b..1a915f326 100644
--- a/Docker/README.md
+++ b/Docker/README.md
@@ -205,6 +205,27 @@ sudo docker run -d --restart unless-stopped --log-opt max-size=10m \
## More deployment options
+### Custom Apache configuration (advanced users)
+
+Changes in Apache `.htaccess` files are applied when restarting the container.
+In particular, if you want FreshRSS to use HTTP-based login (instead of the easier Web form login), you can mount your own `./FreshRSS/p/i/.htaccess`:
+
+```
+sudo docker run ...
+ -v /your/.htaccess:/var/www/FreshRSS/p/i/.htaccess \
+ -v /your/.htpasswd:/var/www/FreshRSS/data/.htpasswd \
+ ...
+ --name freshrss freshrss/freshrss
+```
+
+Example of `/your/.htaccess` referring to `/your/.htpasswd`:
+```
+AuthUserFile /var/www/FreshRSS/data/.htpasswd
+AuthName "FreshRSS"
+AuthType Basic
+Require valid-user
+```
+
### Example with [docker-compose](https://docs.docker.com/compose/)
A [docker-compose.yml](docker-compose.yml) file is given as an example, using PostgreSQL. In order to use it, you have to adapt:
diff --git a/Docker/entrypoint.sh b/Docker/entrypoint.sh
index ba5d12bf2..d4e1808bc 100755
--- a/Docker/entrypoint.sh
+++ b/Docker/entrypoint.sh
@@ -6,7 +6,7 @@ chown -R :www-data .
chmod -R g+r . && chmod -R g+w ./data/
if [ -n "$CRON_MIN" ]; then
- sed -r -i "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" /var/spool/cron/crontabs/www-data
+ sed -r -i "\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" /var/spool/cron/crontabs/root
fi
exec "$@"