Reintroduce TFE duration metadata: DB columns, form fields, controllers, views, and migration

Add 'unsafe-eval' to CSP script-src directives (htmx requires Function())
This commit is contained in:
Pontoporeia
2026-06-11 13:05:37 +02:00
parent 00fed5f0e3
commit d588ae004d
81 changed files with 1061 additions and 840 deletions

View File

@@ -26,10 +26,7 @@ sudo bash /tmp/deploy-server.sh
### 3. Set admin password (first time only)
```bash
just manage-admin-users
ssh xamxam "sudo bash /tmp/manage-admin-users.sh"
```
Visit `/admin/parametres` → Account tab and set the admin password there.
## Manual Setup Steps
@@ -37,15 +34,16 @@ ssh xamxam "sudo bash /tmp/manage-admin-users.sh"
```bash
sudo apt update
sudo apt install nginx apache2-utils php8.4-fpm
sudo apt install nginx php8.4-fpm php8.4-curl php8.4-sqlite3
```
### 2. Create Admin Password
### 2. Set admin password
Visit `/admin/parametres` → Account tab in the admin panel to set the password.
Or generate a hash and insert it directly:
```bash
just manage-admin-users
# Then on the server:
ssh xamxam "sudo bash /tmp/manage-admin-users.sh"
php -r "echo password_hash('your-secret-password', PASSWORD_BCRYPT);"
```
### 3. Copy Nginx Configuration
@@ -69,11 +67,8 @@ sudo systemctl status nginx
### Test Admin Authentication
```bash
# Should return 401
# Should redirect to login page (302)
curl -I https://xamxam.erg.be/admin/
# With credentials
curl -u admin:password https://xamxam.erg.be/admin/
```
### Test File Protection
@@ -92,12 +87,6 @@ curl -I https://xamxam.erg.be/ | grep -E "X-|Strict-Transport"
## Troubleshooting
### 403 Forbidden on admin
```bash
sudo ls -l /etc/nginx/.htpasswd-xamxam
sudo chmod 644 /etc/nginx/.htpasswd-xamxam
```
### 502 Bad Gateway
```bash
sudo systemctl status php8.4-fpm
@@ -112,8 +101,10 @@ sudo nginx -t
## Maintenance
### Change Admin Password
Visit `/admin/parametres` → Account tab or generate a new hash:
```bash
sudo htpasswd /etc/nginx/.htpasswd-xamxam admin
php -r "echo password_hash('new-password', PASSWORD_BCRYPT);"
```
### Reload Configuration
@@ -125,4 +116,4 @@ sudo nginx -t && sudo systemctl reload nginx
- **[docs/PRODUCTION_DEPLOYMENT.md](docs/PRODUCTION_DEPLOYMENT.md)** - Detailed deployment
- **[docs/QUICK_REFERENCE.md](docs/QUICK_REFERENCE.md)** - Command reference
- **[docs/ADMIN_USERS.md](docs/ADMIN_USERS.md)** - User management
- **[docs/PHP_AUTH_LAYER.md](docs/PHP_AUTH_LAYER.md)** - Auth layer documentation