remotes/origin/pgsql-count-bits-12
Andrew Dolgov 5 years ago
commit 3399b10261

@ -1,9 +1,8 @@
# A primitive set of scripts to deploy tt-rss via docker-compose # 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 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).
with minimal fuss.
The general outline of the configuration is as follows: The general outline of the configuration is as follows:
@ -38,9 +37,16 @@ See docker-compose documentation for more information and available options.
### Updating ### 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. 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`` and apply any necessary modifications to ``.env``, etc.
3. Rebuild and start the containers: ``docker-compose up --build``
### Using SSL with Letsencrypt (untested!) ### Using SSL with Letsencrypt (untested!)
- ``HTTP_HOST`` in ``.env`` should be set to a valid hostname (i.e. no localhost or IP address) - ``HTTP_HOST`` in ``.env`` should be set to a valid hostname (i.e. no localhost or IP address)
@ -70,10 +76,27 @@ volumes:
Copy and/or git clone any third party plugins into ``plugins.local`` as usual. 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;
}
```
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 ### TODO
- support for sending mail somehow (smtp mailer?) - [wiki/TODO](https://git.tt-rss.org/fox/ttrss-docker-compose/wiki/TODO)
- properly deal with ``SELF_URL_PATH``
### Suggestions / bug reports ### Suggestions / bug reports

@ -1,5 +1,10 @@
#!/bin/sh -ex #!/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 DST_DIR=/var/www/html/tt-rss
SRC_REPO=https://git.tt-rss.org/fox/tt-rss.git SRC_REPO=https://git.tt-rss.org/fox/tt-rss.git
@ -33,6 +38,8 @@ for d in cache lock feed-icons; do
chmod -R 777 $DST_DIR/$d chmod -R 777 $DST_DIR/$d
done done
$PSQL -c "create extension if not exists pg_trgm"
if ! $PSQL -c 'select * from ttrss_version'; then if ! $PSQL -c 'select * from ttrss_version'; then
$PSQL < /var/www/html/tt-rss/schema/ttrss_schema_pgsql.sql $PSQL < /var/www/html/tt-rss/schema/ttrss_schema_pgsql.sql
fi fi

Loading…
Cancel
Save