Run the Performance Rating System using Docker for easier deployment and isolation.
# Build and start the container
docker-compose up -d
# Open browser to http://localhost:5000
# Generate sample data (run in container)
docker-compose exec app python3 scripts/create_sample_data.py
# Import sample data via the web interface (Import tab)# Start the application
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the application
docker-compose down
# Rebuild after code changes
docker-compose up -d --build
# Run commands inside container
docker-compose exec app python3 scripts/create_sample_data.py
# Access shell in container
docker-compose exec app bashThe database (ratings.db) is stored in the ./data directory, which is mounted as a volume. This ensures your data persists even if you rebuild or remove the container.
Important: The ./data directory contains your database and should be backed up regularly. It's automatically created on first run.
For production use:
-
Remove development volume mount in
docker-compose.yml:# Comment out or remove this line: # - .:/app
-
Set production environment:
environment: - FLASK_ENV=production
-
Use a reverse proxy (nginx, Traefik) for HTTPS and domain routing
-
Set up regular backups of the
./datadirectory
If you prefer to use Docker directly:
# Build the image
docker build -t performance-rating-app .
# Run the container
docker run -d \
--name performance-rating-app \
-p 5000:5000 \
-v $(pwd)/data:/app/data \
-e DATABASE_URL=sqlite:////app/data/ratings.db \
performance-rating-app
# View logs
docker logs -f performance-rating-app