05/24 Enhance functionalities 2

This commit is contained in:
2026-05-24 23:04:55 -04:00
parent cb98c7e222
commit 13f8ba124d
11 changed files with 309 additions and 77 deletions
+23 -2
View File
@@ -141,8 +141,18 @@ DB_PORT=3306
DB_NAME=webchecker
DB_USER=webchecker_user
DB_PASSWORD=YourStrongPasswordHere
CRYPTO_SECRET=<output of: python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())">
FLASK_ENV=production
# AI analysis (can also be set via Admin → Settings after first login)
GROQ_API_KEY=
GROQ_MODEL=llama-3.3-70b-versatile
# SMTP email for password reset and bid reminders (can also be set via Admin → Settings)
SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
SMTP_PASSWORD=
SMTP_FROM=noreply@yourdomain.com
```
Secure the file so only the application user can read it:
@@ -392,7 +402,15 @@ Open a browser and navigate to `https://your-domain.com`. You should see the log
### 9.4 First login
Log in with the default admin credentials set during `initialize_database()`. **Change the password immediately** via Admin → Change Password.
Log in with the default admin credentials set during `initialize_database()`. **Change the password immediately** via Admin → Users (edit your user) or via My Profile → Change Password.
### 9.5 Configure email and AI settings
Navigate to **Admin → Settings** and fill in:
- **Email** — SMTP host, port, security mode, username, password, from address, and recipient list. Click **📬 Test** to verify without leaving the page.
- **Groq AI** — paste your API key and select a model. Click **🔌 Test** to confirm the key works.
These values are stored in the database and take precedence over `.env` fallbacks.
---
@@ -472,6 +490,9 @@ Create `/etc/logrotate.d/webchecker`:
| Sessions expiring immediately | `SECRET_KEY` changed between restarts | Keep `SECRET_KEY` stable in `.env`; never regenerate it on a live system |
| `413 Request Entity Too Large` | File upload exceeds `client_max_body_size` | Increase `client_max_body_size` in the Nginx config |
| Static files returning 404 | Wrong `alias` path in Nginx | Confirm `/opt/webchecker/static/` exists and the `alias` directive ends with `/` |
| Password reset emails not delivered | SMTP not configured or wrong credentials | Go to Admin → Settings, check SMTP fields, click **📬 Test** — the error message shows the SMTP failure reason |
| Groq AI analysis fails with 401 | Invalid or missing API key | Go to Admin → Settings → Groq, paste a valid key, click **🔌 Test** to confirm before saving |
| `BuildError` for a new route after deploy | Gunicorn still running old bytecode | Run `sudo systemctl reload webchecker` — templates go live immediately but Python changes require a reload |
---