Files
Socialflow/docker-compose.yml
T
MichaelandClaude Sonnet 4.6 e39fa1026d feat: replace Cloudinary with MinIO for all media storage
- Create server/services/minio.ts: S3-compatible service (same interface as
  cloudinaryService) using @aws-sdk/client-s3 and MINIO_ENDPOINT env var
- Replace all cloudinaryService imports with minioService across routes.ts,
  routes/reels.ts, routes/remotion.ts, services/media-purge.ts
- Replace Cloudinary logo URL pattern (res.cloudinary.com/...) with
  buildMinioUrl() helper throughout all server routes
- GET /api/cloudinary/config now returns a logoUrl field (full MinIO URL)
  so clients never need to build the URL themselves
- Update settings pages (desktop + mobile): labels changed to MinIO
  (Bucket Name, Access Key, Secret Key)
- Update image-editor.tsx: remove Cloudinary URL transformation, use logoUrl
- Update media-utils.ts: simplify getVideoThumbnailUrl (no URL transforms)
- Add MINIO_ENDPOINT and MINIO_PUBLIC_URL to docker-compose.yml + .env.example
- DB table reuse: cloudinary_config.cloud_name = bucket, api_key = access key,
  api_secret = secret key — no migration needed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 21:05:37 +01:00

90 lines
2.4 KiB
YAML

version: '3.8'
services:
# Base de données PostgreSQL
postgres:
image: postgres:16-alpine
container_name: socialflow-db
restart: unless-stopped
ports:
- "4523:4523"
environment:
POSTGRES_DB: ${PGDATABASE:-socialflow}
POSTGRES_USER: ${PGUSER:-socialflow}
POSTGRES_PASSWORD: ${PGPASSWORD:-changeme}
PGPORT: 4523
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- internal
- nginx_default
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
environment:
NODE_ENV: production
PORT: 5555
DATABASE_URL: postgresql://${PGUSER:-socialflow}:${PGPASSWORD:-changeme}@postgres:4523/${PGDATABASE:-socialflow}
OPENROUTER_API_KEY: ${OPENROUTER_API_KEY}
SESSION_SECRET: ${SESSION_SECRET:-your-secret-key-change-me}
APP_URL: ${APP_URL:-http://localhost:5555}
# URL interne Docker pour que ffmpeg-api puisse télécharger les fichiers audio
INTERNAL_APP_URL: http://socialflow-app:5555
# Configuration FFmpeg Service
FFMPEG_API_URL: http://ffmpeg-api:8000
FFMPEG_API_KEY: ${FFMPEG_API_KEY:-socialflow-secret-ffmpeg-key}
# Configuration MinIO (stockage fichiers)
MINIO_ENDPOINT: ${MINIO_ENDPOINT:-http://minio:9000}
MINIO_PUBLIC_URL: ${MINIO_PUBLIC_URL:-http://localhost:9000}
networks:
- internal
- nginx_default
depends_on:
postgres:
condition: service_healthy
volumes:
- encryption_key:/app/.encryption-key-data
- audio_uploads:/app/uploads/audio
command: npm run start
# Service FFmpeg dédié
ffmpeg-api:
build:
context: ./ffmpeg-service
dockerfile: Dockerfile
container_name: socialflow-ffmpeg
restart: unless-stopped
environment:
API_KEY: ${FFMPEG_API_KEY:-socialflow-secret-ffmpeg-key}
networks:
- internal
expose:
- "8000"
volumes:
postgres_data:
driver: local
encryption_key:
driver: local
audio_uploads:
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