Overview
The Docker installation uses official Ralph images:- allegro/ralph:latest - Main Ralph application
- allegro/ralph-static-nginx:latest - Nginx server for static files
- mysql:5.7 - Database server
- redis:3.0 - Cache and task queue
Prerequisites
- Docker Engine 20.10+
- Docker Compose 2.0+
- 4GB+ RAM available for containers
- 10GB+ disk space
Quick Start
Install Docker and Docker Compose
If you don’t have Docker installed, follow the official installation guide:Verify installation:
Create Docker Compose Configuration
Create a new directory for Ralph and a Add the following configuration:
docker-compose.yml file:docker-compose.yml
Initialize Database
Initialize the Ralph database (run this only once):This will:
- Run database migrations
- Sync the application menu tree
- Create a default superuser
The initialization script will prompt you to create a superuser account. Save these credentials securely.
Start Ralph
Start all services:Ralph will be available at:
- Web Interface: http://localhost
- API Documentation: http://localhost/docs
Container Management
View Running Containers
Stop and Start Services
Upgrade Ralph
Environment Variables
Customize Ralph by setting environment variables in thedocker-compose.yml file:
Database Configuration
Redis Configuration
Additional Settings
Data Persistence
Data is stored in Docker volumes to persist across container restarts:- ralph_dbdata - MySQL database files
- ralph_media - User-uploaded media files
- ralph_static - Static assets (CSS, JS, images)
Backup Volumes
Advanced Configuration
Using PostgreSQL Instead of MySQL
Running Behind a Reverse Proxy
If running behind nginx or another reverse proxy:http://localhost:8080.
Troubleshooting
Containers won't start
Containers won't start
Check for port conflicts:Ensure Docker has enough resources (memory, disk space).
Database connection errors
Database connection errors
The database container may take time to initialize:
Static files not loading
Static files not loading
Ensure volumes are properly mounted:
Permission denied errors
Permission denied errors
On Linux, you may need to adjust volume permissions:
Next Steps
Configuration
Configure LDAP, OpenStack sync, and advanced features
Data Migration
Import existing data or migrate from Ralph 2