use a more strict vhost config
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
Robert Kaussow 2019-09-29 15:07:44 +02:00
parent f4368414f4
commit 22754f9bf9
5 changed files with 18 additions and 11 deletions

View File

@ -1,2 +1,3 @@
* BUGFIX * BUGFIX
* fix port in healthcheck script * fix port in healthcheck script
* use a more strict vhost

View File

@ -24,6 +24,7 @@ RUN apk --update add --virtual .build-deps tar curl && \
apk del .build-deps && \ apk del .build-deps && \
rm -rf /var/cache/apk/* && \ rm -rf /var/cache/apk/* && \
rm -rf /tmp/* && \ rm -rf /tmp/* && \
rm -rf /var/www/app/ChangeLog /var/www/app/config.default.php && \
mkdir -p /var/run/php && \ mkdir -p /var/run/php && \
chown -R nginx /var/run/php && \ chown -R nginx /var/run/php && \
mkdir -p /var/lib/php/tmp_upload && \ mkdir -p /var/lib/php/tmp_upload && \

View File

@ -4,7 +4,7 @@ services:
kanboard: kanboard:
image: xoxys/kanboard:latest image: xoxys/kanboard:latest
ports: ports:
- "80:80" - "80:8080"
volumes: volumes:
- kanboard_data:/var/www/app/data - kanboard_data:/var/www/app/data
- kanboard_plugins:/var/www/app/plugins - kanboard_plugins:/var/www/app/plugins

View File

@ -9,16 +9,12 @@ server {
try_files $uri $uri/ /index.php$is_args$args; try_files $uri $uri/ /index.php$is_args$args;
} }
location ~ \.php$ { location ~ /plugins/.*/Assets/ {
try_files $uri =404; allow all;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
} }
location ~ /data { location ~ /(app|data|libs|plugins|vendor|cli) {
deny all;
return 404; return 404;
} }
@ -30,6 +26,15 @@ server {
return 404; return 404;
} }
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
location ~* ^.+\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$ { location ~* ^.+\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$ {
log_not_found off; log_not_found off;
expires 7d; expires 7d;

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
/usr/local/bin/gomplate -V -o /etc/php7/php.ini -f /etc/templates/php.ini.tmpl 1>/dev/null /usr/local/bin/gomplate -V -o /etc/php7/php.ini -f /etc/templates/php.ini.tmpl 1>/dev/null
/usr/local/bin/gomplate -V -o /var/www/app/config.php -f /etc/templates/config.php.tmpl 1>/dev/null /usr/local/bin/gomplate -V -o /var/www/app/data/config.php -f /etc/templates/config.php.tmpl 1>/dev/null
exec supercronic -split-logs /etc/crontabs/nginx 1>/dev/null & exec supercronic -split-logs /etc/crontabs/nginx 1>/dev/null &
exec php-fpm7 -F & exec php-fpm7 -F &