- Docker and Docker Compose installed
.envfile configured (copy from.env.example)
docker-compose up --waitThis command will:
- Build and start all services
- Wait for MongoDB to be healthy
- Wait for backend to be healthy and connected
- Wait for frontend to be ready
- Exit when all services are healthy
docker-compose up -dThen check health status:
docker-compose psdocker-compose psExpected output:
NAME STATE PORTS
mongo Up (healthy) 27017/tcp
backend Up (healthy) 5000/tcp
frontend Up 3000/tcp
backup Up -
curl http://localhost:5000/healthExpected response:
{
"status": "healthy",
"timestamp": "2024-03-30T10:00:00.000Z",
"checks": {
"database": {
"status": "healthy",
"latency_ms": 5
},
"stellar": {
"status": "healthy",
"latency_ms": 150
}
}
}docker-compose downTo also remove volumes:
docker-compose down -v# All services
docker-compose logs -f
# Specific service
docker-compose logs -f backend
docker-compose logs -f mongo
docker-compose logs -f frontend-
Check MongoDB is healthy:
docker-compose ps mongo
-
View backend logs:
docker-compose logs backend
-
Verify environment variables in
.env
-
Check MongoDB logs:
docker-compose logs mongo
-
Test MongoDB connection:
docker-compose exec mongo mongosh --eval 'db.runCommand({ ping: 1 })'
# Rebuild and restart
docker-compose up --build -d --wait
# Force rebuild without cache
docker-compose build --no-cache
docker-compose up -d --wait- Make code changes
- Rebuild affected service:
docker-compose up --build backend -d
- Check logs:
docker-compose logs -f backend
- MongoDB: Checks every 10s, healthy when responding to ping
- Backend: Checks every 10s, healthy when
/healthreturns 200 - Startup Order: MongoDB → Backend → Frontend
See docs/docker-health-checks.md for detailed information.