Merge pull request #15 from pschmitt/self_url_path
Set SELF_URL_PATH on runtime
This commit is contained in:
commit
b770335bcb
@ -17,12 +17,14 @@ RUN rm /etc/nginx/sites-enabled/default
|
|||||||
RUN git clone https://github.com/gothfox/Tiny-Tiny-RSS.git /var/www
|
RUN git clone https://github.com/gothfox/Tiny-Tiny-RSS.git /var/www
|
||||||
WORKDIR /var/www
|
WORKDIR /var/www
|
||||||
RUN cp config.php-dist config.php
|
RUN cp config.php-dist config.php
|
||||||
RUN sed -i -e "/'SELF_URL_PATH'/s/ '.*'/ 'http:\/\/localhost\/'/" config.php
|
|
||||||
RUN chown www-data:www-data -R /var/www
|
RUN chown www-data:www-data -R /var/www
|
||||||
|
|
||||||
# expose only nginx HTTP port
|
# expose only nginx HTTP port
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
# complete path to ttrss
|
||||||
|
ENV SELF_URL_PATH http://localhost
|
||||||
|
|
||||||
# expose default database credentials via ENV in order to ease overwriting
|
# expose default database credentials via ENV in order to ease overwriting
|
||||||
ENV DB_NAME ttrss
|
ENV DB_NAME ttrss
|
||||||
ENV DB_USER ttrss
|
ENV DB_USER ttrss
|
||||||
|
12
README.md
12
README.md
@ -152,6 +152,18 @@ following additional arguments:
|
|||||||
-e DB_ENV_PASS=docker
|
-e DB_ENV_PASS=docker
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### SELF_URL_PATH
|
||||||
|
|
||||||
|
The `SELF_URL_PATH` config value should be set to the URL where this TinyTinyRSS
|
||||||
|
will be accessible at. Setting it correctly will enable PUSH support and make
|
||||||
|
the browser integration work. Default value: `http://localhost`.
|
||||||
|
|
||||||
|
For more information check out the [official documentation](https://github.com/gothfox/Tiny-Tiny-RSS/blob/master/config.php-dist#L22).
|
||||||
|
|
||||||
|
```
|
||||||
|
-e SELF_URL_PATH=https://example.org/ttrss
|
||||||
|
```
|
||||||
|
|
||||||
### Testing ttrss in foreground
|
### Testing ttrss in foreground
|
||||||
|
|
||||||
For testing purposes it's recommended to initially start this container in foreground.
|
For testing purposes it's recommended to initially start this container in foreground.
|
||||||
|
@ -5,6 +5,9 @@ $confpath = '/var/www/config.php';
|
|||||||
|
|
||||||
$config = array();
|
$config = array();
|
||||||
|
|
||||||
|
// path to ttrss
|
||||||
|
$config['SELF_URL_PATH'] = env('SELF_URL_PATH', 'http://localhost');
|
||||||
|
|
||||||
if (getenv('DB_TYPE') !== false) {
|
if (getenv('DB_TYPE') !== false) {
|
||||||
$config['DB_TYPE'] = getenv('DB_TYPE');
|
$config['DB_TYPE'] = getenv('DB_TYPE');
|
||||||
} elseif (getenv('DB_PORT_5432_TCP_ADDR') !== false) {
|
} elseif (getenv('DB_PORT_5432_TCP_ADDR') !== false) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user