Merge 70f05350e52c80497392939a45d190005561f41d into adacce4ba156ad35a1386fe1b8c19bd929e420f8
This commit is contained in:
commit
5662f80e9d
3
build-ttrssImage.sh
Executable file
3
build-ttrssImage.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker build --rm -t toony/ttrss .
|
@ -106,6 +106,34 @@ foreach ($config as $name => $value) {
|
|||||||
}
|
}
|
||||||
file_put_contents($confpath, $contents);
|
file_put_contents($confpath, $contents);
|
||||||
|
|
||||||
|
$urlParts = parse_url($config['SELF_URL_PATH']);
|
||||||
|
if( $urlParts['path'] != '' && $urlParts['path'] != '/' ) {
|
||||||
|
$nginx = 'server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
index index.php index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
rewrite ^ ' . $config['SELF_URL_PATH'] . ';
|
||||||
|
}
|
||||||
|
|
||||||
|
location ' . rtrim($urlParts['path'], '/') . ' {
|
||||||
|
alias /var/www;
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
allow all;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
|
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}';
|
||||||
|
|
||||||
|
file_put_contents("/etc/nginx/sites-enabled/ttrss", $nginx);
|
||||||
|
}
|
||||||
|
|
||||||
function env($name, $default = null)
|
function env($name, $default = null)
|
||||||
{
|
{
|
||||||
$v = getenv($name) ?: $default;
|
$v = getenv($name) ?: $default;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user