Guide to running RapidPM on your local machine for development.
# 1. Start Docker containers
./scripts/start-dev.sh
# 2. Start Angular dev server (hot reload)
cd rpm-ui
ng serve --proxy-config proxy.conf.json --port 4200
# 3. Open browser
# Frontend: http://localhost:4200 (with hot reload)
# Backend API: http://localhost:8080
Best for: Testing production-like behavior
docker-compose -f docker-compose.prod.yml up -d
# Access: http://localhost:8080
Pros:
Cons:
Best for: Frontend development (recommended)
# Terminal 1: Start backend
docker-compose -f docker-compose.prod.yml up -d
# Terminal 2: Start frontend dev server
cd rpm-ui
ng serve --proxy-config proxy.conf.json --port 4200
Pros:
Cons:
Best for: Backend debugging
# Terminal 1: Start Flask directly
source venv/bin/activate
set -a && source environments/local.env && set +a
python -m flask run --host=0.0.0.0 --port=5000
# Terminal 2: Start Angular
cd rpm-ui
ng serve --proxy-config proxy.conf.json --port 4200
# Terminal 3: Start Celery (if needed)
celery -A celery_app worker --beat --loglevel=info
Pros:
Cons:
By default, local development connects to the production database:
| Environment | Database Host |
|---|---|
| Local Dev | 204.168.180.36 (Production) |
| Test Server | 204.168.180.36 (Test) |
Why production? Test users and data exist in production. The test database is for deployment testing only.
# Edit local.env to point to test database
DATABASE_HOST=204.168.180.36
DATABASE_USER=rpmusertest
DATABASE_PASSWORD=<test-password>
Warning: After changing env files, restart containers:
docker-compose down && docker-compose up -d
cd rpm-ui
ng build --configuration production
cp -r dist/* ../static/
# All containers
docker-compose logs -f
# Specific service
docker-compose logs -f app
# Connect to MySQL
mysql -h 204.168.180.36 -u rpmuser -p RPMnew_dataBase
# Clear Redis cache
docker exec rapid-pm-redis-1 redis-cli FLUSHALL
# Restart flyway container
docker-compose restart flyway
{
"name": "Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app",
"FLASK_ENV": "development"
},
"args": ["run", "--host=0.0.0.0", "--port=5000"]
}
angular.jsonpytest tests/ -v
pytest tests/ -k "test_login" # Specific test
pytest tests/ --cov=app # With coverage
cd rpm-ui
ng test # Watch mode
ng test --watch=false # Single run
cd rpm-ui
npx playwright test # All tests
npx playwright test --ui # Interactive mode
# Use ng serve instead of ng build for development
ng serve --port 4200
# Skip AOT compilation
ng serve --aot=false
# Don't rebuild images unless needed
docker-compose up -d
# Only rebuild specific service
docker-compose build app
mysql -h HOST -u USER -p# Find process
sudo lsof -i :8080
# Kill it
kill -9 <PID>
# Or change port in docker-compose
# Clear and reinstall
rm -rf node_modules package-lock.json
npm install
# Ensure venv is activated
source venv/bin/activate
# Reinstall
pip install -r requirements.txt