Migration to physical server

This commit is contained in:
2025-10-10 14:14:47 +00:00
parent fc9b3228c4
commit 5627829617
3 changed files with 144 additions and 0 deletions

39
setup-dev-environment.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
# Environment Setup Script for Remote Development
set -e
echo "🔧 Setting up development environment..."
# Create .env file from example
if [ ! -f .env ]; then
cp .env.example .env
echo "📝 Created .env file from template"
echo "⚠️ Please edit .env with your specific configuration"
fi
# Create necessary directories
mkdir -p certs/
mkdir -p mosquitto/{config,data,log}
mkdir -p server/media/converted
mkdir -p server/received_screenshots
mkdir -p server/screenshots
# Set permissions for mosquitto
sudo chown -R 1883:1883 mosquitto/data mosquitto/log 2>/dev/null || true
chmod 755 mosquitto/config mosquitto/data mosquitto/log
# Generate development SSL certificates if they don't exist
if [ ! -f certs/dev.crt ] || [ ! -f certs/dev.key ]; then
echo "🔒 Generating development SSL certificates..."
openssl req -x509 -newkey rsa:4096 -keyout certs/dev.key -out certs/dev.crt -days 365 -nodes \
-subj "/C=AT/ST=Vienna/L=Vienna/O=Development/CN=localhost"
echo "✅ SSL certificates generated"
fi
echo "✅ Environment setup complete!"
echo ""
echo "📋 Next steps:"
echo "1. Edit .env file with your configuration"
echo "2. Run: docker compose up -d --build"
echo "3. Access dashboard at http://localhost:5173"