Initial commit: enterprise digital platform with portal SSO, DigiServer, IT Assets, NetworkView, Server Monitor

This commit is contained in:
ske087
2026-05-10 21:07:50 +03:00
commit 8d9df56b0b
364 changed files with 73655 additions and 0 deletions
@@ -0,0 +1,111 @@
# Nginx Config Files Moved to Data Folder
**Date:** January 17, 2026
**Purpose:** Complete persistence isolation - all Docker runtime files in `data/` folder
## What Changed
### Files Moved
- `./nginx.conf``./data/nginx.conf`
- `./nginx-custom-domains.conf``./data/nginx-custom-domains.conf`
### docker-compose.yml Updated
```yaml
volumes:
- ./data/nginx.conf:/etc/nginx/nginx.conf:ro # ✅ NOW in data/
- ./data/nginx-custom-domains.conf:/etc/nginx/conf.d/custom-domains.conf:rw # ✅ NOW in data/
- ./data/nginx-ssl:/etc/nginx/ssl:ro
- ./data/nginx-logs:/var/log/nginx
- ./data/certbot:/var/www/certbot:ro
```
## Complete Data Folder Structure (Now Unified)
```
/data/
├── app/ # Flask application (in Docker image, not mounted)
├── instance/ # Database & config
│ ├── digiserver.db
│ └── server.log
├── uploads/ # User uploads
│ └── app/static/uploads/...
├── nginx.conf # ✅ Nginx main config
├── nginx-custom-domains.conf # ✅ Custom domain config
├── nginx-ssl/ # SSL certificates
│ ├── cert.pem
│ └── key.pem
├── nginx-logs/ # Nginx logs
│ ├── access.log
│ └── error.log
└── certbot/ # Let's Encrypt certificates
```
## Benefits
**Unified Persistence:** All runtime configuration in `/data`
**Easy Backup:** Single `data/` folder contains everything
**Consistent Permissions:** All files managed together
**Clean Repository:** Root directory only has source code
**Deployment Clarity:** Clear separation: source (`./app`) vs runtime (`./data`)
## Testing Results
- ✅ Nginx started successfully with new config paths
- ✅ HTTP requests working (port 80)
- ✅ HTTPS requests working (port 443)
- ✅ No configuration errors
## Updating Existing Deployments
If you have an existing deployment:
```bash
# 1. Copy configs to data/
cp nginx.conf data/nginx.conf
cp nginx-custom-domains.conf data/nginx-custom-domains.conf
# 2. Update docker-compose.yml
# (Already updated - change volume paths from ./ to ./data/)
# 3. Restart nginx
docker-compose restart nginx
# 4. Verify
curl http://localhost
curl -k https://localhost
```
## Important Notes
### If You Edit Nginx Config
```bash
# Edit the config in data/, NOT in root
nano data/nginx.conf
nano data/nginx-custom-domains.conf
# Then restart nginx
docker-compose restart nginx
```
### Root Files Now Optional
The old `nginx.conf` and `nginx-custom-domains.conf` in the root can be:
- **Deleted** (cleanest - all runtime files in data/)
- **Kept** (reference/backup - but not used by containers)
### Recommendations
- Delete root nginx config files for cleaner repository
- Keep in `.gitignore` if you want to preserve them as backups
- All active configs now in `data/` folder which can be `.gitignore`d
## Related Changes
Part of ongoing simplification:
1. ✅ Option 1 Implementation - Dockerfile-based code deployment
2. ✅ Groups feature archived
3. ✅ Legacy playlist routes simplified
4. ✅ Nginx configs now in data/ folder
All contributing to:
- Cleaner repository structure
- Complete persistence isolation
- Production-ready deployment model