From d1216415b9f6793c058e585d14cd266cf93c1b72 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 22 Jul 2014 15:23:42 +0200 Subject: [PATCH] Added plugin for supporting synchronization for News+ on Android. --- 10_ttrss.sh | 3 +++ Dockerfile | 13 ++++++++--- README.md | 35 ++++++++++++++++++++++++---- ttrss.nginx.conf => ttrss-nginx.conf | 0 4 files changed, 44 insertions(+), 7 deletions(-) rename ttrss.nginx.conf => ttrss-nginx.conf (100%) diff --git a/10_ttrss.sh b/10_ttrss.sh index 8d7afa2..4ca89a2 100755 --- a/10_ttrss.sh +++ b/10_ttrss.sh @@ -13,3 +13,6 @@ openssl req -new -newkey rsa:2048 -days 3650 -nodes -x509 \ -out "/etc/ssl/certs/ttrss.cert" chmod 600 "/etc/ssl/private/ttrss.key" chmod 600 "/etc/ssl/certs/ttrss.cert" + +# Configure Nginx so that is doesn't show its version number in the HTTP headers. +sed -i -e "s/.*server_tokens.*/server_tokens off;/g" /etc/nginx/nginx.conf diff --git a/Dockerfile b/Dockerfile index 3be08da..302f1cf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y \ # php5-mysql # add ttrss as the only nginx site -ADD ttrss.nginx.conf /etc/nginx/sites-available/ttrss +ADD ttrss-nginx.conf /etc/nginx/sites-available/ttrss RUN ln -s /etc/nginx/sites-available/ttrss /etc/nginx/sites-enabled/ttrss RUN rm /etc/nginx/sites-enabled/default @@ -39,11 +39,15 @@ ADD ttrss-plugin-mobilize.pgsql /var/www/ttrss/plugins/mobilize/ttrss-plugin-mob # patch ttrss-mobilize plugin for getting it to work RUN sed -i -e "s/ +$ docker run -d --link $DB:db -p 443:443 --name ttrss x86dev/docker-ttrss ``` Running this command for the first time will download the image automatically. @@ -76,7 +77,7 @@ This is particular useful for your initial database setup, as errors get reporte the console and further execution will halt. ```bash -$ sudo docker run -it --link ttrss-data:db -p 443:443 --name ttrss +$ sudo docker run -it --link ttrss-data:db -p 443:443 --name ttrss x86dev/docker-ttrss ``` ##### Database configuration @@ -112,5 +113,31 @@ Remaining arguments can be passed just like before, the following is the recomme minimum: ```bash -$ sudo docker run -d --link ttrss-data:db -p 443:443 --name ttrss +$ sudo docker run -d --link ttrss-data:db -p 443:443 --name ttrss x86dev/docker-ttrss +``` + +##### Backing up / moving to another server + +Decided to back up your data container and/or move to another server? Here's how +you do it: + +On the old server, stop your ttrss container and then do: + +``` +docker commit -m "Backup of XXX" +docker save > /tmp/.tar +``` + +On the new server, copy the created .tar file from the old server and +import the file with: + +``` +docker load < +``` + +This will load the container from the .tar file into Docker's local registry. +After that you can run that imported container again the usual way with: + +``` +docker run -d ``` diff --git a/ttrss.nginx.conf b/ttrss-nginx.conf similarity index 100% rename from ttrss.nginx.conf rename to ttrss-nginx.conf