feat: add Podman compatibility with non-privileged ports
- Change Docker ports from 80/8000 to 8081/8080 (non-privileged) - Update CORS_ORIGINS in docker-compose.yml and .env.docker - Update all documentation (README.md, DOCKER.md) with new ports - Add Podman compatibility section to CHANGELOG.md - Enable podman-compose usage without root privileges
This commit is contained in:
@@ -8,8 +8,8 @@ SECRET_KEY=CHANGEZ-MOI-cle-secrete-unique-minimum-32-caracteres-obligatoire
|
||||
# Base de données (stockée dans le volume ./data)
|
||||
DATABASE_URL=sqlite+aiosqlite:////data/school_management.db
|
||||
|
||||
# CORS - Ajustez selon vos domaines
|
||||
CORS_ORIGINS=["http://localhost","http://localhost:80","https://votre-domaine.com"]
|
||||
# CORS - Ajustez selon vos domaines (ports Docker/Podman: 8080/8081)
|
||||
CORS_ORIGINS=["http://localhost:8081","http://localhost:8080","http://localhost:3000","https://votre-domaine.com"]
|
||||
|
||||
# Logging
|
||||
LOG_LEVEL=INFO
|
||||
|
||||
@@ -12,6 +12,10 @@ et ce projet adhère au [Semantic Versioning](https://semver.org/lang/fr/).
|
||||
### 🎉 Réécriture Complète (Flask → FastAPI + Vue.js)
|
||||
|
||||
#### Added
|
||||
- **Podman Compatibility** : Support complet sans privilèges root
|
||||
- Ports non-privilégiés (8080/8081 au lieu de 80/8000)
|
||||
- Compatible docker-compose et podman-compose
|
||||
- Documentation complète dans DOCKER.md
|
||||
- **Backend FastAPI** : API REST JSON pure avec support async
|
||||
- FastAPI 0.115+
|
||||
- SQLAlchemy 2.0.36+ avec aiosqlite
|
||||
|
||||
14
DOCKER.md
14
DOCKER.md
@@ -27,9 +27,11 @@ docker-compose up -d
|
||||
```
|
||||
|
||||
**Accès :**
|
||||
- Frontend : http://localhost
|
||||
- API : http://localhost:8000
|
||||
- Documentation API : http://localhost:8000/api/v2/docs
|
||||
- Frontend : http://localhost:8081
|
||||
- API : http://localhost:8080
|
||||
- Documentation API : http://localhost:8080/api/v2/docs
|
||||
|
||||
> 💡 **Compatibilité Podman** : Les ports 8080/8081 (>1024) permettent l'utilisation sans privilèges root
|
||||
|
||||
---
|
||||
|
||||
@@ -186,10 +188,10 @@ Les services incluent des healthchecks automatiques :
|
||||
|
||||
```bash
|
||||
# Vérifier la santé du backend
|
||||
curl http://localhost:8000/api/v2/health
|
||||
curl http://localhost:8080/api/v2/health
|
||||
|
||||
# Vérifier la santé du frontend
|
||||
curl http://localhost/
|
||||
curl http://localhost:8081/
|
||||
|
||||
# Voir le statut Docker
|
||||
docker-compose ps
|
||||
@@ -268,7 +270,7 @@ server {
|
||||
server_name notytex.example.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:80;
|
||||
proxy_pass http://localhost:8081;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
17
README.md
17
README.md
@@ -32,26 +32,33 @@ npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### **Accès**
|
||||
### **Accès (Mode Développement)**
|
||||
|
||||
- **Frontend** : http://localhost:3000
|
||||
- **API Backend** : http://localhost:8000
|
||||
- **Documentation API** : http://localhost:8000/api/v2/docs
|
||||
- **ReDoc** : http://localhost:8000/api/v2/redoc
|
||||
|
||||
### **Déploiement avec Docker** 🐳
|
||||
### **Déploiement avec Docker / Podman** 🐳
|
||||
|
||||
```bash
|
||||
# Configuration
|
||||
cp .env.docker .env
|
||||
# Éditez .env et changez SECRET_KEY
|
||||
|
||||
# Démarrage
|
||||
# Démarrage (Docker ou Podman)
|
||||
docker-compose up -d
|
||||
|
||||
# Accès: http://localhost
|
||||
# ou
|
||||
podman-compose up -d
|
||||
```
|
||||
|
||||
**Accès (Mode Docker/Podman) :**
|
||||
- **Frontend** : http://localhost:8081
|
||||
- **API Backend** : http://localhost:8080
|
||||
- **Documentation API** : http://localhost:8080/api/v2/docs
|
||||
|
||||
> 💡 **Ports sans privilèges** : Les ports 8080/8081 permettent l'utilisation avec Podman sans root
|
||||
|
||||
📖 **Documentation complète** : [`DOCKER.md`](DOCKER.md)
|
||||
|
||||
---
|
||||
|
||||
@@ -9,11 +9,11 @@ services:
|
||||
container_name: notytex-backend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "8080:8000"
|
||||
environment:
|
||||
- DATABASE_URL=sqlite+aiosqlite:////data/school_management.db
|
||||
- SECRET_KEY=${SECRET_KEY:-change-me-in-production-min-32-chars}
|
||||
- CORS_ORIGINS=["http://localhost","http://localhost:80","http://localhost:3000"]
|
||||
- CORS_ORIGINS=["http://localhost:8081","http://localhost:8080","http://localhost:3000"]
|
||||
- LOG_LEVEL=INFO
|
||||
volumes:
|
||||
- ./data:/data
|
||||
@@ -35,7 +35,7 @@ services:
|
||||
container_name: notytex-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80"
|
||||
- "8081:80"
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user