mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-10-23 07:42:05 +00:00
Remove /bullboard from caching
Fixed entrypoint to make the binary executable
This commit is contained in:
@@ -80,6 +80,9 @@ update_agents() {
|
|||||||
# Copy new agents
|
# Copy new agents
|
||||||
cp -r /app/agents_backup/* /app/agents/
|
cp -r /app/agents_backup/* /app/agents/
|
||||||
|
|
||||||
|
# Make agent binaries executable
|
||||||
|
chmod +x /app/agents/patchmon-agent-linux-* 2>/dev/null || true
|
||||||
|
|
||||||
# Verify update
|
# Verify update
|
||||||
local new_version=$(get_agent_version "$current_agent")
|
local new_version=$(get_agent_version "$current_agent")
|
||||||
if [ "$new_version" = "$backup_version" ]; then
|
if [ "$new_version" = "$backup_version" ]; then
|
||||||
|
@@ -27,11 +27,17 @@ server {
|
|||||||
# Bull Board proxy - must come before the root location to avoid conflicts
|
# Bull Board proxy - must come before the root location to avoid conflicts
|
||||||
location /bullboard {
|
location /bullboard {
|
||||||
proxy_pass http://${BACKEND_HOST}:${BACKEND_PORT};
|
proxy_pass http://${BACKEND_HOST}:${BACKEND_PORT};
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection 'upgrade';
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_cache_bypass $http_upgrade;
|
||||||
|
proxy_read_timeout 300s;
|
||||||
|
proxy_connect_timeout 75s;
|
||||||
|
|
||||||
# Preserve original client IP through proxy chain
|
# Preserve original client IP through proxy chain
|
||||||
proxy_set_header X-Original-Forwarded-For $http_x_forwarded_for;
|
proxy_set_header X-Original-Forwarded-For $http_x_forwarded_for;
|
||||||
@@ -84,8 +90,8 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Static assets caching
|
# Static assets caching (exclude Bull Board assets)
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
location ~* ^/(?!bullboard).*\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||||
expires 1y;
|
expires 1y;
|
||||||
add_header Cache-Control "public, immutable";
|
add_header Cache-Control "public, immutable";
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user