Simplify deployment by removing the reverse proxy configuration

Removes Nginx configuration, updates Docker Compose, README, and .env.example to streamline deployment and access the application directly on port 5000.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 91318273-c764-4fd4-be04-bdc12c38af32
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/6e755801-08e8-4492-805e-ac3610de5a2a.jpg
This commit is contained in:
michaelschal committed 2025-07-09 20:16:37 +00:00
1 parent 4ad5b97932
commit a155425537
5 files changed
+15 -110

No files matched your search

+2 -1
View File
@@ -2,7 +2,7 @@
# Copiez ce fichier en .env et modifiez les valeurs selon vos besoins
# Configuration de la base de données
DATABASE_URL=postgresql://regisflow:regisflow2024@localhost:5432/regisflow
DATABASE_URL=postgresql://regisflow:regisflow2024@postgres:5432/regisflow
POSTGRES_PASSWORD=regisflow2024
# Configuration de l'application
@@ -15,6 +15,7 @@ SESSION_SECRET=your-super-secret-session-key-change-in-production
# Configuration du timezone
TZ=Europe/Paris
# Note: L'application sera accessible sur http://localhost:5000 après le démarrage
# Configuration optionnelle pour les sauvegardes
BACKUP_RETENTION_DAYS=30
MAX_BACKUP_COUNT=10
+7 -12
View File
@@ -55,8 +55,7 @@ docker-compose up -d
docker-compose logs -f
# Accéder à l'application
# http://localhost (avec nginx)
# ou http://localhost:5000 (accès direct)
# http://localhost:5000
```
## 📋 Services Inclus
@@ -73,11 +72,7 @@ docker-compose logs -f
- **Sauvegardes**: Volume `backup_data`
- **Health check**: `/health`
### 3. Nginx (Reverse Proxy)
- **Port**: 80 (HTTP)
- **Port**: 443 (HTTPS - à configurer)
- **Compression**: Gzip activée
- **Cache**: Optimisé pour les assets statiques
## 🔧 Commandes Utiles
@@ -239,12 +234,12 @@ L'application gère automatiquement les migrations de base de données au démar
## 📝 Configuration Avancée
### Personnalisation de Nginx
### Accès via Reverse Proxy (Optionnel)
Éditez le fichier `nginx.conf` pour :
- Configurer SSL/TLS
- Ajouter des règles de sécurité
- Optimiser les performances
Si vous souhaitez ajouter un reverse proxy (Nginx, Apache, etc.) :
- Configurez le proxy pour pointer vers `localhost:5000`
- Ajoutez la configuration SSL/TLS si nécessaire
- Optimisez les performances selon vos besoins
### Variables d'environnement complètes
+1 -14
View File
@@ -50,20 +50,7 @@ services:
retries: 3
start_period: 60s
# Nginx reverse proxy (optionnel)
nginx:
image: nginx:alpine
container_name: regisflow-nginx
depends_on:
- regisflow
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "80:80"
- "443:443"
networks:
- regisflow-network
restart: unless-stopped
volumes:
postgres_data:
-79
View File
@@ -1,79 +0,0 @@
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Configuration des logs
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log warn;
# Configuration générale
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# Configuration de compression
gzip on;
gzip_vary on;
gzip_min_length 10240;
gzip_proxied expired no-cache no-store private must-revalidate auth;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/javascript
application/xml+rss
application/json;
# Configuration du serveur
server {
listen 80;
server_name localhost;
# Limite de taille des fichiers
client_max_body_size 50M;
# Configuration des headers de sécurité
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
# Proxy vers l'application RegisFlow
location / {
proxy_pass http://regisflow:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
proxy_read_timeout 86400;
}
# Configuration pour les fichiers statiques
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
proxy_pass http://regisflow:5000;
expires 1y;
add_header Cache-Control "public, immutable";
}
# Health check
location /health {
proxy_pass http://regisflow:5000/health;
access_log off;
}
}
}
+5 -4
View File
@@ -124,9 +124,9 @@ Preferred communication style: Simple, everyday language.
### Docker Deployment
- **Container Strategy**: Multi-stage Docker build for optimized production images
- **Service Architecture**: Docker Compose with PostgreSQL, Nginx, and application containers
- **Service Architecture**: Docker Compose with PostgreSQL and application containers
- **Database**: PostgreSQL 15 with persistent volumes and automated initialization
- **Reverse Proxy**: Nginx with compression, caching, and security headers
- **Direct Access**: Application accessible directly on port 5000
- **Health Monitoring**: Health checks for all services with automatic recovery
- **Volume Management**: Persistent storage for database and backup data
- **Environment**: Complete environment variable configuration with security templates
@@ -204,10 +204,11 @@ Preferred communication style: Simple, everyday language.
### Docker Configuration (January 9, 2025)
- ✅ Complete Docker setup with multi-stage build for production optimization
- ✅ Docker Compose configuration with PostgreSQL, Nginx, and application services
- ✅ Docker Compose configuration with PostgreSQL and application services
- ✅ Automated database initialization and migration scripts
- ✅ Health checks and proper container orchestration
- ✅ Production-ready configuration with security best practices
- ✅ Persistent volumes for database and backup data
- ✅ Environment variable configuration with .env.example template
- ✅ Comprehensive Docker documentation with deployment instructions
- ✅ Comprehensive Docker documentation with deployment instructions
- ✅ Nginx configuration removed for simplified deployment (application accessible on port 5000)