mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
Configure external network for Nginx proxy in Docker Compose
Add `nginx_default` external network to `docker-compose.yml` for Nginx reverse proxy communication, and assign the `internal` network to PostgreSQL and the application. 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/vhNnBGJ
This commit is contained in:
1 parent
15e619bd8d
commit
4e9c9bfe6f
1 file changed
+14
@@ -12,6 +12,8 @@ services:
|
|||||||
POSTGRES_PASSWORD: ${PGPASSWORD:-changeme}
|
POSTGRES_PASSWORD: ${PGPASSWORD:-changeme}
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
# Port non exposé sur l'hôte pour plus de sécurité en production
|
# 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
|
# Décommentez la ligne suivante si vous avez besoin d'accéder à la DB localement
|
||||||
# ports:
|
# ports:
|
||||||
@@ -40,6 +42,9 @@ services:
|
|||||||
APP_URL: ${APP_URL:-http://localhost:5000}
|
APP_URL: ${APP_URL:-http://localhost:5000}
|
||||||
volumes:
|
volumes:
|
||||||
- ./uploads:/app/uploads
|
- ./uploads:/app/uploads
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
- nginx_default
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -48,3 +53,12 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
driver: local
|
driver: local
|
||||||
|
|
||||||
|
networks:
|
||||||
|
# Réseau interne pour la communication DB <-> App
|
||||||
|
internal:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
# Réseau externe pour nginx reverse proxy
|
||||||
|
nginx_default:
|
||||||
|
external: true
|
||||||
Reference in new issue
Block a user