feat: add Review Board Cloudron package (Development)
- Create Dockerfile wrapping official Review Board image - Add CloudronManifest.json with PostgreSQL addon - Create start.sh script with PostgreSQL wait and Django migrations - Include README.md with comprehensive review platform documentation - Add .env.example for environment configuration - Add CHANGELOG.md for version tracking - Add logo.png (Review Board branding) Review Board is a web-based code and document review tool that tracks pending code, graphics, documents, and all discussions around product decisions. Package includes: - Official Review Board Docker image wrapper (1.29GB) - Cloudron PostgreSQL addon for Django database - Automatic database migrations on startup - Admin user creation via environment variables - Comprehensive documentation with integration examples - Examples for GitHub, GitLab, Mercurial, and Perforce Features supported: - Code review with advanced diff viewer (syntax highlighting, interdiffs) - Document review (PDF and Office files) - Discussion tracking with threaded comments - Review requests workflow - Repository integration (Git, Mercurial, Perforce, Plastic, Azure DevOps) - Team and project management - Email notifications - Search across reviews and discussions - Power Pack extension support (reports, LDAP sync, GitHub Enterprise) - User authentication (LDAP, OAuth, traditional) Environment variables: - SECRET_KEY: Django secret key - ALLOWED_HOSTS: Allowed hosts (default: *) - REVIEWBOARD_SITE_ROOT: Site root URL - ADMIN_USERNAME/EMAIL/PASSWORD: Admin account creation - LDAP_*: LDAP/Active Directory configuration Ports: - 8080: Main HTTP port (web interface and API) 💘 Generated with Crush Assisted-by: GLM-4.7 via Crush <crush@charm.land>
This commit is contained in:
59
Package-Workspace/Development/reviewboard/start.sh
Executable file
59
Package-Workspace/Development/reviewboard/start.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
echo "Starting Review Board Cloudron package..."
|
||||
|
||||
# Database connection from Cloudron
|
||||
DB_NAME=${CLOUDRON_POSTGRESQL_DATABASE:-reviewboard}
|
||||
DB_USER=${CLOUDRON_POSTGRESQL_USERNAME:-reviewboard}
|
||||
DB_PASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD}
|
||||
DB_HOST=${CLOUDRON_POSTGRESQL_HOST:-127.0.0.1}
|
||||
DB_PORT=${CLOUDRON_POSTGRESQL_PORT:-5432}
|
||||
|
||||
echo "Database host: $DB_HOST"
|
||||
echo "Database port: $DB_PORT"
|
||||
echo "Database name: $DB_NAME"
|
||||
|
||||
# Wait for PostgreSQL to be ready
|
||||
echo "Waiting for PostgreSQL to be ready..."
|
||||
until PGPASSWORD=$DB_PASSWORD psql -h "$DB_HOST" -p "$DB_PORT" -U "$DB_USER" -d "$DB_NAME" -c '\q' 2>/dev/null; do
|
||||
echo "PostgreSQL is unavailable - sleeping"
|
||||
sleep 2
|
||||
done
|
||||
|
||||
echo "PostgreSQL is ready!"
|
||||
|
||||
# Django configuration
|
||||
export REVIEWBOARD_SITE_ROOT=${REVIEWBOARD_SITE_ROOT:-https://$CLOUDRON_APP_DOMAIN}
|
||||
export DATABASE_TYPE=postgresql
|
||||
export DATABASE_NAME=$DB_NAME
|
||||
export DATABASE_USER=$DB_USER
|
||||
export DATABASE_PASSWORD=$DB_PASSWORD
|
||||
export DATABASE_HOST=$DB_HOST
|
||||
export DATABASE_PORT=$DB_PORT
|
||||
export MEMCACHED_SERVER=
|
||||
export SECRET_KEY=${SECRET_KEY:-cloudron-secret-key-change-in-production}
|
||||
export ALLOWED_HOSTS=${ALLOWED_HOSTS:-'*'}
|
||||
|
||||
# Site directory
|
||||
export REVIEWBOARD_SITEDIR=/site
|
||||
|
||||
# Run database migrations
|
||||
echo "Running Review Board database migrations..."
|
||||
./manage.py migrate --noinput
|
||||
|
||||
# Collect static files
|
||||
echo "Collecting static files..."
|
||||
./manage.py collectstatic --noinput
|
||||
|
||||
# Create admin user if specified
|
||||
if [ -n "$ADMIN_USERNAME" ] && [ -n "$ADMIN_PASSWORD" ] && [ -n "$ADMIN_EMAIL" ]; then
|
||||
echo "Creating admin user..."
|
||||
echo "from django.contrib.auth import get_user_model; from django.core.management import call_command; User = get_user_model(); User.objects.create_superuser('$ADMIN_USERNAME', '$ADMIN_EMAIL', '$ADMIN_PASSWORD') if not User.objects.filter(email='$ADMIN_EMAIL').exists() else None" | \
|
||||
./manage.py shell 2>/dev/null || echo "Admin user may already exist"
|
||||
fi
|
||||
|
||||
# Start Review Board
|
||||
echo "Starting Review Board..."
|
||||
exec ./serve.sh
|
||||
Reference in New Issue
Block a user