diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e132744 --- /dev/null +++ b/.gitignore @@ -0,0 +1,100 @@ +# OS/Editor +.DS_Store +Thumbs.db +.vscode/ +.idea/ + +# Python +__pycache__/ +*.pyc +.pytest_cache/ + +# Node +node_modules/ +dashboard/node_modules/ +dashboard/.vite/ + +# Env files (never commit secrets) +.env +.env.local + +# Docker +*.log +# Python-related +__pycache__/ +*.py[cod] +*.pyo +*.pyd +*.pdb +*.egg-info/ +*.eggs/ +*.env +.env + +# Byte-compiled / optimized / DLL files +*.pyc +*.pyo +*.pyd + +# Virtual environments +venv/ +env/ +.venv/ +.env/ + +# Logs and databases +*.log +*.sqlite3 +*.db + +# Docker-related +*.pid +*.tar +docker-compose.override.yml +docker-compose.override.*.yml +docker-compose.override.*.yaml + +# Node.js-related +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Dash and Flask cache +*.cache +*.pytest_cache/ +instance/ +*.mypy_cache/ +*.hypothesis/ +*.coverage +.coverage.* + +# IDE and editor files +.vscode/ +.idea/ +*.swp +*.swo +*.bak +*.tmp + +# OS-generated files +.DS_Store +Thumbs.db +desktop.ini + +# Devcontainer-related +.devcontainer/ + +received_screenshots/ +mosquitto/ +alte/ +screenshots/ +media/ +dashboard/manitine_test.py +dashboard/pages/test.py +.gitignore +dashboard/sidebar_test.py +dashboard/assets/responsive-sidebar.css +certs/ +sync.ffs_db +.pnpm-store/ diff --git a/connect_to_github.sh b/connect_to_github.sh new file mode 100755 index 0000000..e1f3020 --- /dev/null +++ b/connect_to_github.sh @@ -0,0 +1,73 @@ +#!/bin/bash +# Script to connect this workspace to your existing GitHub repository + +echo "πŸ”— Connecting workspace to GitHub repository..." +echo "=================================================" + +# Check if repository name is provided +if [ -z "$1" ]; then + echo "❌ Error: Repository name required" + echo "" + echo "Usage: $0 " + echo "" + echo "Examples:" + echo " $0 infoscreen_2025" + echo " $0 infoscreen-2025" + echo " $0 infoscreen_server_2025" + echo "" + echo "Your GitHub username appears to be: robbstarkaustria" + exit 1 +fi + +REPO_NAME="$1" +GITHUB_USER="robbstarkaustria" +REPO_URL="https://github.com/${GITHUB_USER}/${REPO_NAME}.git" + +echo "Repository: ${REPO_URL}" +echo "" + +# Add the remote origin +echo "πŸ”„ Adding remote origin..." +git remote add origin "$REPO_URL" + +if [ $? -eq 0 ]; then + echo "βœ… Remote origin added successfully" +else + echo "⚠️ Remote might already exist, removing and re-adding..." + git remote remove origin 2>/dev/null + git remote add origin "$REPO_URL" +fi + +# Show current remotes +echo "" +echo "πŸ“‹ Current remotes:" +git remote -v + +echo "" +echo "πŸ”„ Fetching from remote repository..." +git fetch origin + +echo "" +echo "πŸ”„ Setting upstream and pushing..." +git branch --set-upstream-to=origin/main main + +# Try to push (might require authentication) +echo "" +echo "πŸš€ Pushing to GitHub..." +echo "Note: You may need to authenticate with GitHub" +git push -u origin main + +if [ $? -eq 0 ]; then + echo "" + echo "πŸŽ‰ Successfully connected and pushed to GitHub!" + echo "Repository URL: https://github.com/${GITHUB_USER}/${REPO_NAME}" +else + echo "" + echo "⚠️ Push failed. This might be because:" + echo "1. You need to authenticate with GitHub" + echo "2. The repository doesn't exist" + echo "3. You don't have push permissions" + echo "" + echo "Try running: git push -u origin main" + echo "Or use GitHub CLI: gh auth login" +fi \ No newline at end of file diff --git a/server/init_defaults.py b/server/init_defaults.py index 4bfee8f..18ec0f3 100644 --- a/server/init_defaults.py +++ b/server/init_defaults.py @@ -23,7 +23,7 @@ with engine.connect() as conn: # Admin-Benutzer anlegen, falls nicht vorhanden admin_user = os.getenv("DEFAULT_ADMIN_USERNAME", "infoscreen_admin") admin_pw = os.getenv("DEFAULT_ADMIN_PASSWORD", "Info_screen_admin25!") - # Passwort hashen mit bcrypt + # Passwort hashen mit bcrypt hashed_pw = bcrypt.hashpw(admin_pw.encode( 'utf-8'), bcrypt.gensalt()).decode('utf-8') # PrΓΌfen, ob User existiert