mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
Change the default exposed port and environment variable PORT from 5000 to 5555 in Dockerfile and docker-compose.yml. 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/p0c5kxJ
65 lines
1.8 KiB
YAML
65 lines
1.8 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
# Base de données PostgreSQL
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: socialflow-db
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: ${PGDATABASE:-socialflow}
|
|
POSTGRES_USER: ${PGUSER:-socialflow}
|
|
POSTGRES_PASSWORD: ${PGPASSWORD:-changeme}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- internal
|
|
# 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:
|
|
# - "${PGPORT:-5432}:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${PGUSER:-socialflow}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# Application Social Flow
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: socialflow-app
|
|
restart: unless-stopped
|
|
# Port non exposé publiquement car nginx reverse proxy accède via le réseau Docker
|
|
# Décommentez si vous avez besoin d'accéder directement sans nginx :
|
|
# ports:
|
|
# - "${PORT:-5555}:5555"
|
|
environment:
|
|
NODE_ENV: production
|
|
PORT: 5555
|
|
DATABASE_URL: postgresql://${PGUSER:-socialflow}:${PGPASSWORD:-changeme}@postgres:5432/${PGDATABASE:-socialflow}
|
|
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
|
|
SESSION_SECRET: ${SESSION_SECRET:-your-secret-key-change-me}
|
|
APP_URL: ${APP_URL:-http://localhost:5555}
|
|
networks:
|
|
- internal
|
|
- nginx_default
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
command: sh -c "node dist/migrate.js && npm run start"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
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
|