Clean up repository - remove runtime files, add proper gitignore

This commit is contained in:
RZ_MINIX\rober 2025-06-15 20:45:21 -07:00
parent 01c9fbeb08
commit 2061023c15
5 changed files with 121 additions and 40 deletions

View File

105
deploy-react-app.sh Normal file
View File

@ -0,0 +1,105 @@
#!/bin/bash
set -e
echo "Deploying React application using volume mounts..."
# Check if React app is already built
if [ ! -d ~/server-setup/well_mob_pwa/build ]; then
echo "React build directory not found. Building React application..."
cd ~/server-setup/well_mob_pwa
# Set environment variables to bypass TypeScript errors
export CI=false
export TSC_COMPILE_ON_ERROR=true
export ESLINT_NO_DEV_ERRORS=true
export DISABLE_ESLINT_PLUGIN=true
# Build the React app
npm run build
# Check if build was successful
if [ ! -d "build" ]; then
echo "React build failed. Please check the errors."
exit 1
fi
echo "React build completed successfully."
cd ~/server-setup
else
echo "Using existing React build directory."
fi
# Return to server-setup directory
cd ~/server-setup
# Ensure we have the Nginx config for the React app
if [ ! -f ./nginx/conf.d/react.conf ]; then
echo "Creating Nginx configuration for React app..."
mkdir -p ./nginx/conf.d
# Try with sudo if needed
if ! cat > ./nginx/conf.d/react.conf << 'EOL'
server {
listen 80;
server_name react.eluxnetworks.net;
location / {
root /usr/share/nginx/html/react;
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# For static assets
location /assets/ {
root /usr/share/nginx/html/react;
expires 1y;
add_header Cache-Control "public, max-age=31536000";
access_log off;
}
}
EOL
then
echo "Permission denied. Trying with sudo..."
sudo tee ./nginx/conf.d/react.conf > /dev/null << 'EOL'
server {
listen 80;
server_name react.eluxnetworks.net;
location / {
root /usr/share/nginx/html/react;
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
}
# For static assets
location /assets/ {
root /usr/share/nginx/html/react;
expires 1y;
add_header Cache-Control "public, max-age=31536000";
access_log off;
}
}
EOL
fi
fi
# Update permissions for acme.json if needed
if [ -f acme.json ]; then
chmod 600 acme.json
fi
echo "Restarting Docker containers..."
docker compose down
docker compose up -d
# Check container status
echo "Checking container status..."
sleep 5
docker compose ps
echo "React application deployment completed."
echo "Please verify that all sites are working correctly:"
echo "- http://eluxnetworks.net/"
echo "- https://eluxnetworks.net/"
echo "- https://eluxnetworks.net/well_tests/ (user: well_tester, pass: TestWell_2025)"
echo "- https://eluxnetworks.net/shared/"
echo "- https://react.eluxnetworks.net/assets/login-backgroud.png"

16
mosquitto-new.conf Normal file
View File

@ -0,0 +1,16 @@
# Basic configuration
persistence true
persistence_location /mosquitto/data
log_dest file /mosquitto/log/mosquitto.log
log_type warning
log_type error
log_type notice
log_type information
# Only standard MQTT port - no TLS here
listener 1883
protocol mqtt
# Authentication
allow_anonymous false
password_file /mosquitto/config/passwd

View File

@ -1,2 +0,0 @@
management.load_definitions = /etc/rabbitmq/definitions.json

View File

@ -1,38 +0,0 @@
{
"users": [
{
"name": "admin",
"password_hash": "YX91m9ZBhL8oXzpxcrYtVAOv4vgTDfS0YCCYJA1UDPPbNJ+m",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": ["administrator"]
},
{
"name": "well_pipe",
"password_hash": "AzdMI/4joetKPS2J5AsBOVKMZzW6Dp/ov6xal8vFbLpal43F",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": ["api_user"]
}
],
"vhosts": [
{
"name": "/"
}
],
"permissions": [
{
"user": "admin",
"vhost": "/",
"configure": ".*",
"write": ".*",
"read": ".*"
},
{
"user": "well_pipe",
"vhost": "/",
"configure": ".*",
"write": ".*",
"read": ".*"
}
]
}