From a0fde5fe0769f4a972917164b863a3bc5dfc018b Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 16 Nov 2019 08:20:36 +0000 Subject: [PATCH 01/12] Update 'README.md' --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index f73ab54..6cfda1a 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,22 @@ volumes: Copy and/or git clone any third party plugins into ``plugins.local`` as usual. +### How do I put this container behind a reverse proxy? + +A common pattern is shared nginx doing SSL termination, etc. + +``` + location /tt-rss/ { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_pass http://127.0.0.1:8280/tt-rss/; + break; + } +``` + ### TODO - support for sending mail somehow (smtp mailer?) From 342400bae9e88bf6bec02293bac63aa38e5234f0 Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 16 Nov 2019 08:24:18 +0000 Subject: [PATCH 02/12] Update 'README.md' --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6cfda1a..bdef659 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,8 @@ A common pattern is shared nginx doing SSL termination, etc. } ``` +You will need to set ``SELF_URL_PATH`` to a correct (i.e. visible from the outside) value in ``config.php`` inside the container. + ### TODO - support for sending mail somehow (smtp mailer?) From d34322a187df3685e8a022fc619adecd6e7afa74 Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 16 Nov 2019 10:19:36 +0000 Subject: [PATCH 03/12] Update 'README.md' --- README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bdef659..62a7edd 100644 --- a/README.md +++ b/README.md @@ -90,9 +90,8 @@ You will need to set ``SELF_URL_PATH`` to a correct (i.e. visible from the outsi ### TODO - - support for sending mail somehow (smtp mailer?) - - properly deal with ``SELF_URL_PATH`` - +- [wiki/TODO](https://git.tt-rss.org/fox/ttrss-docker-compose/wiki/TODO) + ### Suggestions / bug reports - - [Forum thread](https://community.tt-rss.org/t/docker-compose-tt-rss/2894) +- [Forum thread](https://community.tt-rss.org/t/docker-compose-tt-rss/2894) From 818725f4fb48fd907d0aacee080f59717983f194 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 16 Nov 2019 13:33:58 +0300 Subject: [PATCH 04/12] create pg_trgm if needed --- app/startup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/startup.sh b/app/startup.sh index 173e2df..4eba7df 100755 --- a/app/startup.sh +++ b/app/startup.sh @@ -29,6 +29,8 @@ for d in cache lock feed-icons; do chmod -R 777 $DST_DIR/$d done +$PSQL -c "create extension if not exists pg_trgm" + if ! $PSQL -c 'select * from ttrss_version'; then $PSQL < /var/www/html/tt-rss/schema/ttrss_schema_pgsql.sql fi From a0b542f12786742618a5254fe7a3e8ab8c4badb7 Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 16 Nov 2019 11:20:54 +0000 Subject: [PATCH 05/12] Update 'README.md' --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 62a7edd..ab9d8bb 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # A primitive set of scripts to deploy tt-rss via docker-compose -**EXPERIMENTAL STUFF, DON'T USE IN PRODUCTION YET UNLESS YOU KNOW WHAT YOU'RE DOING** +The idea is to provide tt-rss working (and updating) out of the box with minimal fuss. -The idea is to provide tt-rss working (and updating) out of the box -with minimal fuss. +Not fully tested yet, don't use in production unless you know what you're doing. The general outline of the configuration is as follows: From a2ff174987ea55f580d324b0e74eac378b019596 Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 16 Nov 2019 11:21:25 +0000 Subject: [PATCH 06/12] Update 'README.md' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ab9d8bb..9303147 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The idea is to provide tt-rss working (and updating) out of the box with minimal fuss. -Not fully tested yet, don't use in production unless you know what you're doing. +Not fully tested yet, don't use in production unless you know what you're doing. Some features may not be implemented yet, check TODO. The general outline of the configuration is as follows: From 43fa20f74026710021a92812567c10eeba7ff7cb Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 16 Nov 2019 11:21:54 +0000 Subject: [PATCH 07/12] Update 'README.md' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9303147..4546a0c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The idea is to provide tt-rss working (and updating) out of the box with minimal fuss. -Not fully tested yet, don't use in production unless you know what you're doing. Some features may not be implemented yet, check TODO. +Not fully tested yet, don't use in production unless you know what you're doing. Some features may not be implemented yet, check the [TODO](https://git.tt-rss.org/fox/ttrss-docker-compose/wiki/TODO). The general outline of the configuration is as follows: From 3f6d5a435bfa58948e9ad9a195bb08eb28ec4532 Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 16 Nov 2019 11:23:43 +0000 Subject: [PATCH 08/12] Update 'README.md' --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4546a0c..5ee1971 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,16 @@ See docker-compose documentation for more information and available options. ### Updating -Restarting the container will update the source from origin repository. If database needs to be updated, +Restarting the container will update tt-rss from the origin repository. If database needs to be updated, tt-rss will prompt you to do so on next page refresh. +#### Updating container scripts + +1. Stop the containers: ``docker-compose down && docker-compose rm`` +2. Update scripts from git: ``git pull origin master`` +3. Rebuild and start the containers: ``docker-compose up --build`` + + ### Using SSL with Letsencrypt (untested!) - ``HTTP_HOST`` in ``.env`` should be set to a valid hostname (i.e. no localhost or IP address) From 66234dfe9984bed99573f61e0e2e9a1090c57206 Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 16 Nov 2019 11:24:26 +0000 Subject: [PATCH 09/12] Update 'README.md' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ee1971..8a9733d 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ tt-rss will prompt you to do so on next page refresh. #### Updating container scripts 1. Stop the containers: ``docker-compose down && docker-compose rm`` -2. Update scripts from git: ``git pull origin master`` +2. Update scripts from git: ``git pull origin master`` and apply any necessary modifications to ``.env``, etc. 3. Rebuild and start the containers: ``docker-compose up --build`` From 7758c0fe84e8f174768842375972d00ba0d2c16e Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 16 Nov 2019 11:25:31 +0000 Subject: [PATCH 10/12] Update 'README.md' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8a9733d..ef5c70b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The idea is to provide tt-rss working (and updating) out of the box with minimal fuss. -Not fully tested yet, don't use in production unless you know what you're doing. Some features may not be implemented yet, check the [TODO](https://git.tt-rss.org/fox/ttrss-docker-compose/wiki/TODO). +Not fully tested yet, don't use in production unless you know what you're doing. Some features may not be implemented or broken, check the [TODO](https://git.tt-rss.org/fox/ttrss-docker-compose/wiki/TODO). The general outline of the configuration is as follows: From 4442decd2ae5c829b3f0f44fdc6ce93e1ce9ba87 Mon Sep 17 00:00:00 2001 From: fox Date: Sat, 16 Nov 2019 11:26:11 +0000 Subject: [PATCH 11/12] Update 'README.md' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef5c70b..91df6a5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ The idea is to provide tt-rss working (and updating) out of the box with minimal fuss. -Not fully tested yet, don't use in production unless you know what you're doing. Some features may not be implemented or broken, check the [TODO](https://git.tt-rss.org/fox/ttrss-docker-compose/wiki/TODO). +Not fully tested yet, don't use in production unless you know what you're doing. Some features may be unimplemented or broken, check the [TODO](https://git.tt-rss.org/fox/ttrss-docker-compose/wiki/TODO). The general outline of the configuration is as follows: From e343f3d09f03f932495e0790a4e33c4221a10045 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 29 Nov 2019 10:09:28 +0300 Subject: [PATCH 12/12] on app startup, wait until database is ready --- app/startup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/startup.sh b/app/startup.sh index 4eba7df..0282b7a 100755 --- a/app/startup.sh +++ b/app/startup.sh @@ -1,5 +1,10 @@ #!/bin/sh -ex +while ! pg_isready -h $DB_HOST; do + echo waiting until $DB_HOST is ready... + sleep 3 +done + DST_DIR=/var/www/html/tt-rss SRC_REPO=https://git.tt-rss.org/fox/tt-rss.git