af2c01dbee
- docker-compose.dev.yml: MongoDB 7, tek düğümlü replica set (port 27020) - Backend: Axum + tokio, GET /api/health - Frontend: React + TypeScript + Vite, /api proxy, geçici durum ekranı - Kök package.json: npm run dev ile DB + backend + frontend - backend/api.http örnek istekler Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
30 lines
901 B
YAML
30 lines
901 B
YAML
# Yerel geliştirme veritabanı: MongoDB 7, tek düğümlü replica set (transaction desteği için).
|
||
# Not: 27017 sistemdeki MongoDB'de, 27018/27019 diğer projelerde → kakeibo 27020 kullanır.
|
||
name: kakeibo
|
||
|
||
services:
|
||
mongo:
|
||
image: mongo:7
|
||
container_name: kakeibo-mongo
|
||
command: ["--replSet", "rs0", "--bind_ip_all"]
|
||
ports:
|
||
- "127.0.0.1:27020:27017"
|
||
volumes:
|
||
- kakeibo-mongo-data:/data/db
|
||
restart: unless-stopped
|
||
# Replica set ilk açılışta otomatik başlatılır; sonraki açılışlarda yalnızca durum kontrol edilir.
|
||
healthcheck:
|
||
test:
|
||
- CMD
|
||
- mongosh
|
||
- --quiet
|
||
- --eval
|
||
- "try { rs.status().ok } catch (e) { rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'localhost:27017'}]}).ok }"
|
||
interval: 5s
|
||
timeout: 10s
|
||
retries: 20
|
||
start_period: 5s
|
||
|
||
volumes:
|
||
kakeibo-mongo-data:
|