another fix

This commit is contained in:
nmemmert committed 2025-11-06 14:48:48 -05:00
1 parent c94ae3df7f
commit 4b63917064
1 file changed
+14 -2
+14 -2
View File
@@ -64,6 +64,7 @@ pip install gunicorn
# Create application directory structure
echo "Setting up application directory..."
mkdir -p static
mkdir -p processed # Ensure processed directory exists
# Copy logo if it exists in repo, otherwise you'll need to add it
# cp path/to/trbc-logo-full.png static/ # Uncomment and adjust if needed
@@ -102,9 +103,19 @@ Restart=always
WantedBy=multi-user.target
EOF
# Set proper permissions
# Set proper permissions for web application
echo "Setting proper permissions for web application..."
sudo chown -R $CURRENT_USER:$CURRENT_USER /home/$CURRENT_USER/pdf-rename-sort
# Make static files accessible to nginx (and other users if needed)
sudo chmod -R 755 /home/$CURRENT_USER/pdf-rename-sort/static
sudo chmod -R 755 /home/$CURRENT_USER/pdf-rename-sort/processed
# Ensure the processed directory exists and is accessible
sudo mkdir -p /home/$CURRENT_USER/pdf-rename-sort/processed
sudo chown -R $CURRENT_USER:$CURRENT_USER /home/$CURRENT_USER/pdf-rename-sort/processed
sudo chmod -R 755 /home/$CURRENT_USER/pdf-rename-sort/processed
# Enable and start the service
echo "Starting the application service..."
sudo systemctl daemon-reload
@@ -158,7 +169,7 @@ server {
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied expired no-cache no-store private must-revalidate auth;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss;
}
EOF
@@ -220,4 +231,5 @@ echo " sudo systemctl status nginx"
echo ""
echo "NOTE: This setup runs alongside your existing app on port 5000."
echo "The PDF Renamer will be accessible at https://nextgenpdf.trbc.org."
echo "File permissions have been set for web access (755 for directories)."
echo "Installed for user: $CURRENT_USER"