mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
Update deployment to use Nginx reverse proxy network
Configure docker-compose.yml and DOCKER.md to enable Nginx reverse proxy access by making the application and PostgreSQL available on the `nginx_default` external network. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/MNNRXY7
This commit is contained in:
1 parent
990542ff0f
commit
5bd45764b4
3 files changed
+14
-29
No files matched your search
@@ -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 {
|
||||
|
||||
+5
-6
@@ -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
|
||||
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user