Add watchtower, fixes and prepare for new caddy handling
This commit is contained in:
parent
a594e5d083
commit
29f31783f5
14 changed files with 213 additions and 42 deletions
|
@ -13,5 +13,3 @@ TTRSS_SELF_URL_PATH=https://rss.serguzim.me/tt-rss/
|
|||
# TTRSS_SESSION_COOKIE_LIFETIME=2592000
|
||||
# TTRSS_FORCE_ARTICLE_PURGE=30
|
||||
# etc, etc.
|
||||
|
||||
HTTP_PORT=8280
|
||||
|
|
|
@ -4,15 +4,23 @@ services:
|
|||
app:
|
||||
image: cthulhoo/ttrss-fpm-pgsql-static
|
||||
restart: always
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
env_file:
|
||||
- .env
|
||||
- .secret.env
|
||||
volumes:
|
||||
- app:/var/www/html
|
||||
networks:
|
||||
tt-rss:
|
||||
aliases:
|
||||
- tt-rss-app
|
||||
|
||||
updater:
|
||||
image: cthulhoo/ttrss-fpm-pgsql-static
|
||||
restart: always
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
env_file:
|
||||
- .env
|
||||
- .secret.env
|
||||
|
@ -21,16 +29,29 @@ services:
|
|||
depends_on:
|
||||
- app
|
||||
command: /opt/tt-rss/updater.sh
|
||||
networks:
|
||||
tt-rss:
|
||||
|
||||
web-nginx:
|
||||
image: cthulhoo/ttrss-web-nginx
|
||||
restart: always
|
||||
ports:
|
||||
- ${HTTP_PORT}:80
|
||||
labels:
|
||||
com.centurylinklabs.watchtower.enable: true
|
||||
volumes:
|
||||
- app:/var/www/html:ro
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
tt-rss:
|
||||
services:
|
||||
aliases:
|
||||
- tt-rss
|
||||
|
||||
volumes:
|
||||
app:
|
||||
|
||||
networks:
|
||||
tt-rss:
|
||||
services:
|
||||
external: true
|
||||
|
|
61
tt-rss/nginx.conf
Normal file
61
tt-rss/nginx.conf
Normal file
|
@ -0,0 +1,61 @@
|
|||
worker_processes auto;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
access_log /dev/stdout;
|
||||
error_log /dev/stderr warn;
|
||||
|
||||
sendfile on;
|
||||
|
||||
index index.php;
|
||||
|
||||
upstream app {
|
||||
server tt-rss-app:9000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
root /var/www/html;
|
||||
|
||||
location /tt-rss/cache {
|
||||
aio threads;
|
||||
internal;
|
||||
}
|
||||
|
||||
location /tt-rss/backups {
|
||||
internal;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
# regex to split $uri to $fastcgi_script_name and $fastcgi_path
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
|
||||
# Check that the PHP script exists before passing it
|
||||
try_files $fastcgi_script_name =404;
|
||||
|
||||
# Bypass the fact that try_files resets $fastcgi_path_info
|
||||
# see: http://trac.nginx.org/nginx/ticket/321
|
||||
set $path_info $fastcgi_path_info;
|
||||
fastcgi_param PATH_INFO $path_info;
|
||||
|
||||
fastcgi_index index.php;
|
||||
include fastcgi.conf;
|
||||
|
||||
fastcgi_pass app;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in a new issue