-
Notifications
You must be signed in to change notification settings - Fork 1
DevContainer Setup
poinT92 edited this page Sep 24, 2025
·
1 revision
This directory contains the development environment configuration for DataProfiler, implementing Phase 1 & 2 of Issue #58.
# Open in VS Code with Dev Containers extension
code .
# VS Code will prompt to "Reopen in Container"# Enhanced setup script with error handling
just setup full
# Or use legacy script
just setup-legacy
# Start databases
just db-setup
# Complete setup with databases and tests
just setup-complete.devcontainer/
βββ devcontainer.json # VS Code dev container configuration
βββ Dockerfile # Multi-stage development container
βββ docker-compose.yml # Database services
βββ init-scripts/ # Database initialization
β βββ postgres/
β β βββ 01-init-schema.sql
β βββ mysql/
β βββ 01-init-schema.sql
βββ test-data/ # Sample data for testing
β βββ sample.csv
β βββ large-sample.csv
βββ README.md # This file
-
PostgreSQL 15 (
localhost:5432)- Database:
dataprof_test - User:
dataprof/ Password:dev_password_123 - Pre-loaded with sample data and schemas
- Database:
-
MySQL 8.0 (
localhost:3306)- Database:
dataprof_test - User:
dataprof/ Password:dev_password_123 - Pre-loaded with sample data and schemas
- Database:
-
Redis (
localhost:6379) - For caching tests -
MinIO (
localhost:9000) - S3-compatible storage - DuckDB - File-based analytical database
# Start with admin tools
just db-setup-all
# Access web interfaces
# pgAdmin: http://localhost:8080 (admin@dataprof.dev / admin123)
# phpMyAdmin: http://localhost:8081
# MinIO Console: http://localhost:9090 (minioadmin / minioadmin123)# Start core databases
just db-setup
# Start all services including admin tools
just db-setup-all
# Check database status
just db-status
# View logs
just db-logs postgres # or mysql, redis, etc.
# Connect to databases
just db-connect-postgres
just db-connect-mysql
# Reset all data (β οΈ destructive)
just db-reset# Test specific databases
just test-postgres
just test-mysql
just test-sqlite
just test-duckdb
# Test all databases with services running
just test-all-db
# Full quality check
just qualityThe development environment includes pre-loaded test data:
-
sample_data- Employee data with various data types -
data_types_test- Comprehensive data type testing -
employee_summary- View for aggregated data
-
.devcontainer/test-data/sample.csv- Basic CSV with 8 records -
.devcontainer/test-data/large-sample.csv- Product catalog data
-- PostgreSQL
SELECT * FROM dataprof_test.employee_summary;
SELECT name, salary FROM dataprof_test.sample_data WHERE salary > 70000;
-- MySQL
SELECT * FROM employee_summary;
SELECT name, salary FROM sample_data WHERE salary > 70000;- Extensions: Rust Analyzer, Docker, Database tools
- Settings: Auto-format on save, clippy integration
- Tasks: Build, test, quality checks
- Debugging: LLDB configuration for Rust
- Cargo configuration for faster builds
- Volume caching for dependencies
- Incremental compilation enabled
β Development Containers
- Multi-stage Dockerfile (development/testing/production)
- VS Code integration with full extension setup
- Volume caching for performance
β Database Services
- PostgreSQL, MySQL, Redis, MinIO, DuckDB
- Health checks and proper initialization
- Pre-loaded schemas and test data
β Task Automation
- Enhanced
justfilewith database commands - Cross-platform setup scripts (Bash + PowerShell)
- One-command environment setup
β Cross-Platform Support
- Linux, macOS, Windows (WSL2/Git Bash)
- Automatic platform detection
- Robust error handling and logging
Docker not running
# Start Docker Desktop
# Wait for Docker to be fully started
docker ps # Should work without errorsDatabase initialization failed
# Check logs
just db-logs mysql
just db-logs postgres
# Reset if needed
just db-resetPermission errors on Windows
# Use PowerShell as Administrator
# Or use WSL2 environmentBuild cache issues
# Clear cargo cache
cargo clean
# Or rebuild container
docker-compose -f .devcontainer/docker-compose.yml build --no-cacheFaster Rust builds
- Use volume caching (already configured)
- Increase Docker memory allocation (8GB+ recommended)
- Use
cargo buildin dev mode for iteration
Database performance
- Allocate more memory to Docker
- Use local volumes for persistence
- Consider database-specific tuning
- DEVELOPMENT.md - Complete development workflow
- justfile - All available commands
- Docker Compose - Service configuration
- Issue #58 - Original requirements
Planned for future implementation:
- Comprehensive development documentation
- IDE-specific setup guides
- Enhanced test data management
- Code snippets and templates
- Automated dependency management
Quick Commands Reference:
just setup # Setup development environment
just db-setup # Start databases
just test-all-db # Test with databases
just quality # Full quality checks
just --list # Show all commands