# Start all services for development
docker-compose up -d
# View all logs
docker-compose logs -f
# View logs for a specific service (e.g., server, client)
docker-compose logs -f <service_name>
# Stop services
docker-compose down# Deploy to production
docker-compose -f docker-compose.production.yml up -d
# View all logs
docker-compose -f docker-compose.production.yml logs -f
# View logs for a specific service (e.g., server, client)
docker-compose -f docker-compose.production.yml logs -f <service_name>
# Stop services
docker-compose -f docker-compose.production.yml downTo reset the database with sample data, execute the following command, which runs the reset script directly within the server container:
# Run the database reset script in the development server container
docker-compose exec server python sampling/reset_db.pyNote: This command is intended for a development environment where the server container is built with development dependencies (Faker, etc.). The production server does not include these dependencies.
- Database: PostgreSQL with PGroonga extension for full-text search
- Vector DB: Qdrant for embeddings and vector search
- Backend: FastAPI server using
Dockerfile.devwith both production and development dependencies. - Frontend: Next.js with development server and hot reload (Dockerfile.dev)
- Proxy: Nginx with HTTP-only configuration for localhost
- Database: PostgreSQL with PGroonga extension and persistent volumes
- Vector DB: Qdrant with persistent storage
- Backend: FastAPI server optimized for production (standard Dockerfile)
- Frontend: Next.js production build (standard Dockerfile)
- Proxy: Nginx with HTTPS/SSL configuration
The project uses different Dockerfiles for different purposes:
Dockerfile: Production build with onlyrequirements.txtdependenciesDockerfile.dev: Development build with bothrequirements.txtanddev.requirements.txtdependencies
Dockerfile: Production build for Next.jsDockerfile.dev: Development build with hot reload support
server/requirements.txt: Production dependencies (FastAPI, SQLAlchemy, etc.)server/dev.requirements.txt: Development dependencies (Faker, pytest, black, etc.)
Make sure you have the appropriate environment files:
./server/.env.development- For local development./server/.env.production- For production deployment
- Application: http://localhost
- API Docs: http://localhost/docs
- Database: localhost:5432
- Qdrant: localhost:6333
- Application: https://yourdomain.com
- API Docs: https://yourdomain.com/docs
- Database: Internal network only
- Qdrant: Internal network only
# Build and start services
docker-compose up -d --build
# Build specific services
docker-compose build server # Uses Dockerfile
docker-compose build client # Uses Dockerfile.dev
# Execute commands in containers
docker-compose exec server bash
docker-compose exec client sh
# Stop and remove everything
docker-compose down -vDevelopment Environment:
# Stop and remove all services, networks, and volumes
docker-compose down -v
# Remove all including built images
docker-compose down -v --rmi all
# Complete system cleanup (removes all unused containers, networks, volumes)
docker system prune -a --volumesProduction Environment:
# Stop and remove all services, networks, and volumes for production
docker-compose -f docker-compose.production.yml down -v
# Remove all including built images
docker-compose -f docker-compose.production.yml down -v --rmi all# List remaining volumes
docker volume ls
# Remove specific volumes if needed
docker volume rm ssa_postgres_data ssa_qdrant_data
# Remove all unused volumes
docker volume prune
# Complete system cleanup (use with caution)
docker system prune -a --volumes- Check
.dockerignorefiles to ensure environment files are not excluded - For development, make sure
.envand.env.developmentfiles exist - For production, make sure
.env.productionexists