docs: update README and Copilot instructions for new DB init workflow

Replace placeholder clone URL with actual repo URL:
https://github.com/RobbStarkAustria/infoscreen_2025.git
Add first-run step to initialize the database using the one-shot script:
python server/initialize_database.py
Mention initialize_database.py in project structure
Add a one-shot DB init command to the “Database Management” section
Update Copilot instructions:
Prefer initialize_database.py for local dev (migrations + defaults + academic periods)
Note legacy init scripts were removed; use Alembic + initialize_database.py going forward
No runtime/code changes; documentation only
This commit is contained in:
RobbStarkAustria
2025-10-11 07:01:19 +00:00
parent 4a97ad4f1d
commit 0601bac243
3 changed files with 16 additions and 77 deletions

View File

@@ -82,7 +82,7 @@ A comprehensive multi-service digital signage solution for educational instituti
1. **Clone the repository**
```bash
git clone <repository-url>
git clone https://github.com/RobbStarkAustria/infoscreen_2025.git
cd infoscreen_2025
```
@@ -98,7 +98,13 @@ A comprehensive multi-service digital signage solution for educational instituti
# or: docker compose up -d --build
```
4. **Access the services**
4. **Initialize the database (first run only)**
```bash
# One-shot: runs all Alembic migrations, creates default admin/group, and seeds academic periods
python server/initialize_database.py
```
5. **Access the services**
- Dashboard: http://localhost:5173
- API: http://localhost:8000
- Database: localhost:3306
@@ -177,6 +183,7 @@ infoscreen_2025/
│ ├── routes/ # API endpoints
│ ├── alembic/ # Database migrations
│ ├── media/ # File storage
│ ├── initialize_database.py # All-in-one DB initialization (dev)
│ └── worker.py # Background jobs
├── listener/ # MQTT listener service
├── scheduler/ # Event scheduling service
@@ -213,6 +220,9 @@ make fix-perms # Fix file permissions
### Database Management
```bash
# One-shot initialization (schema + defaults + academic periods)
python server/initialize_database.py
# Access database directly
docker exec -it infoscreen-db mysql -u${DB_USER} -p${DB_PASSWORD} ${DB_NAME}