diff --git a/DOCKER.md b/DOCKER.md index aea2089..bcb3291 100644 --- a/DOCKER.md +++ b/DOCKER.md @@ -54,39 +54,25 @@ docker-compose down ### Réseau interne (`internal`) - PostgreSQL et l'application communiquent sur ce réseau privé -- La base de données n'est **pas exposée** sur l'hôte pour plus de sécurité -### Réseau nginx (`nginx_default`) - OPTIONNEL +### Réseau nginx (`nginx_default`) - Réseau externe pour le reverse proxy Nginx -- **Par défaut : désactivé** (commenté dans docker-compose.yml) -- Décommentez-le uniquement si vous utilisez Nginx +- PostgreSQL et l'application sont sur ce réseau +- Permet l'accès via Nginx et un domaine personnalisé -## 📝 Configuration Nginx (optionnelle) +## 📝 Configuration Nginx -### Activation du réseau Nginx +### Prérequis : Créer le réseau nginx -Si vous utilisez Nginx comme reverse proxy : +**Avant de lancer docker-compose**, créez le réseau nginx (une seule fois) : -1. **Créer le réseau Docker nginx** (une seule fois) : ```bash docker network create nginx_default ``` -2. **Décommenter dans docker-compose.yml** : -```yaml -# Dans la section app > networks : -networks: - - internal - - nginx_default # ← Décommentez cette ligne +### Configuration Nginx -# Dans la section networks en bas du fichier : -networks: - # ... - nginx_default: - external: true # ← Décommentez ces 2 lignes -``` - -3. **Mettre à jour votre configuration Nginx** pour cibler le port **4523** : +Mettez à jour votre configuration Nginx pour cibler le port **4523** : ```nginx upstream socialflow { diff --git a/docker-compose.yml b/docker-compose.yml index 5557b79..88ecb63 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,6 +14,7 @@ services: - postgres_data:/var/lib/postgresql/data networks: - internal + - nginx_default # Port non exposé sur l'hôte pour plus de sécurité en production # Décommentez la ligne suivante si vous avez besoin d'accéder à la DB localement # ports: @@ -42,8 +43,7 @@ services: APP_URL: ${APP_URL:-http://localhost:4523} networks: - internal - # Décommentez la ligne suivante si vous utilisez Nginx reverse proxy : - # - nginx_default + - nginx_default depends_on: postgres: condition: service_healthy @@ -58,7 +58,6 @@ networks: internal: driver: bridge - # Réseau externe pour nginx reverse proxy (optionnel) - # Décommentez si vous utilisez Nginx : - # nginx_default: - # external: true + # Réseau externe pour nginx reverse proxy + nginx_default: + external: true diff --git a/replit.md b/replit.md index 673fccc..82f03e3 100644 --- a/replit.md +++ b/replit.md @@ -11,7 +11,7 @@ Preferred communication style: Simple, everyday language. ## Recent Changes ### October 17, 2025 -- **Docker Deployment Configuration**: Configured Docker Compose for private server deployment with PostgreSQL and application on same network. Application exposed on port 4523:4523 as requested. PostgreSQL and app communicate via internal Docker network for security. Updated Dockerfile to use port 4523. Optional nginx reverse proxy support (commented by default). Created comprehensive DOCKER.md documentation with setup instructions, network architecture explanation, security best practices, and troubleshooting guide. +- **Docker Deployment Configuration**: Configured Docker Compose for private server deployment with PostgreSQL and application on same network. Application exposed on port 4523:4523 as requested. PostgreSQL and app communicate via internal Docker network and are both on nginx_default external network for reverse proxy access. Updated Dockerfile to use port 4523. Created comprehensive DOCKER.md documentation with setup instructions, network architecture explanation, and troubleshooting guide. ### October 14, 2025 - **Publication History Error Display Fix**: Fixed bug where publication history incorrectly displayed persistent errors for posts that failed initially but succeeded on retry. Problem: When a post failed, the `error` field was populated, but when the post was successfully republished, only `publishedAt` and `externalPostId` were updated without clearing the `error` field. Solution: Modified `schedulerService.publishPost()` to set `error: null` when publication succeeds, ensuring error messages are cleared from the history view after successful republication.