- Replace vmsg WASM encoder with native MediaRecorder API (WebM/Opus) to fix empty MP3 files causing OpenAI Whisper 400 errors - Add minimum recording duration (2s) and file size (5KB) guards - Add MinIO S3 storage integration for recipe images and audio - Add /uploads/* API route that proxies files from MinIO with local fallback - Save audio locally first for transcription, then upload to MinIO (fixes ECONNREFUSED when backend tried to fetch its own public URL) - Add docker-compose.prod.yml, nginx-prod.conf, frontend Dockerfile - Frontend Dockerfile: no-cache headers on index.html, long cache on hashed assets Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
container_name: freedge-backend
|
|
restart: always
|
|
env_file: ./backend/.env
|
|
environment:
|
|
- NODE_ENV=production
|
|
- PORT=3000
|
|
- DATABASE_URL=file:/app/data/freedge.db
|
|
- CORS_ORIGINS=https://freedge.app
|
|
- FRONTEND_URL=https://freedge.app
|
|
- PUBLIC_BASE_URL=https://freedge.app/api
|
|
- MINIO_ENDPOINT=host.docker.internal
|
|
- MINIO_PORT=9000
|
|
- MINIO_USE_SSL=false
|
|
- MINIO_ACCESS_KEY=admin
|
|
- MINIO_SECRET_KEY=Kx9mP2vL7wQn4jRs
|
|
- MINIO_BUCKET=freedge
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|
|
volumes:
|
|
- db-data:/app/data
|
|
- uploads:/app/uploads
|
|
expose:
|
|
- "3000"
|
|
networks:
|
|
- freedge
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
args:
|
|
VITE_API_BASE_URL: https://freedge.app/api
|
|
VITE_GOOGLE_CLIENT_ID: 173866668387-i18igc0e1avqtsaqq6nig898bv6pvuk6.apps.googleusercontent.com
|
|
container_name: freedge-frontend
|
|
restart: always
|
|
expose:
|
|
- "80"
|
|
networks:
|
|
- freedge
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: freedge-nginx
|
|
restart: always
|
|
ports:
|
|
- "8081:80"
|
|
volumes:
|
|
- ./nginx-prod.conf:/etc/nginx/conf.d/default.conf:ro
|
|
depends_on:
|
|
- backend
|
|
- frontend
|
|
networks:
|
|
- freedge
|
|
|
|
volumes:
|
|
db-data:
|
|
uploads:
|
|
|
|
networks:
|
|
freedge:
|
|
driver: bridge
|