Get Started in Minutes
This quick start guide will help you set up OpenEyes for development using Docker Compose. This is the fastest way to get a working OpenEyes instance running on your machine.This guide is for development and testing purposes. For production deployment, see the Installation Guide.
Prerequisites
Before you begin, ensure you have the following installed:Docker Desktop
Install Docker Desktop (includes Docker Compose)
- macOS/Windows: Download Docker Desktop
- Linux: Install Docker Engine and Docker Compose separately
Quick Installation
Clone the Repository
Clone the OpenEyes repository from GitHub:
The default branch is
master (stable). For bleeding-edge development, use git checkout developConfigure Environment Variables
Create a Add the following configuration:
.env file in the .devcontainer directory:.env
Start the Services
Launch the OpenEyes stack using Docker Compose:This will start two containers:Wait for the message indicating the web server is ready (typically 2-3 minutes on first run).
db- MySQL database with sample dataweb- Apache/PHP web server with OpenEyes application
Access OpenEyes
Once the containers are running, access OpenEyes in your browser:HTTP: http://localhost:7777HTTPS: https://localhost:7743
Default login credentials:
- Username:
admin - Password:
admin(or as configured in your sample database)
Docker Compose Configuration
The development environment uses the following configuration from.devcontainer/docker-compose.yml:
Key Environment Variables
| Variable | Default | Description |
|---|---|---|
PHP_VERSION | 7.4 | PHP version (7.4, 8.0, or 8.1) |
MYSQL_ROOT_PASSWORD | openeyes | MySQL root password |
DATABASE_HOST | db | Database hostname |
DATABASE_USER | openeyes | Database username |
DATABASE_PASS | openeyes | Database password |
OE_MODE | DEV | Operating mode (DEV, TEST, LIVE) |
OE_INSTITUTION_CODE | NEW | Institution identifier |
XDEBUG_MODE | debug | Enable Xdebug for PHP debugging |
Common Development Tasks
Running Database Migrations
Apply database schema changes:Installing PHP Dependencies
Update Composer dependencies:Viewing Logs
Application logs:Accessing the Database
Connect to MySQL:Running Tests
Execute PHPUnit tests:Working with Modules
Installing Additional Modules
Set theMODULES environment variable to automatically install specific modules:
.env
Available Modules
Common modules included in OpenEyes:OphCiExamination- Clinical examination (core)OphCoCorrespondence- Letters and correspondenceOphDrPrescription- Prescription managementOphCoTherapyapplication- Therapy applicationsOphInBiometry- Biometry measurementsOphCoMessaging- Internal messagingGenetics- Genetic testing workflowsPatientTicketing- Queue management
Troubleshooting
Port Already in Use
Port Already in Use
If ports 7777 or 7743 are already in use, modify the port mappings in Then restart:
docker-compose.yml:docker compose up -dDatabase Connection Failed
Database Connection Failed
Ensure the database container is healthy:If needed, recreate the database:
Permission Errors
Permission Errors
Fix file permissions inside the container:
Composer Install Fails
Composer Install Fails
Clear Composer cache and reinstall:
Stopping the Environment
Stop containers (preserves data):Development Workflow
Make Code Changes
Edit files in your local repository. Changes are automatically synced to the container via volume mounts.
Test Changes
Refresh your browser to see changes. For PHP changes, no restart needed. For configuration changes, restart the web container:
Next Steps
Installation Guide
Production installation and configuration
API Reference
Explore the OpenEyes API
Contributing
Contribute to OpenEyes development
Module Development
Learn to create custom modules