-
-
Notifications
You must be signed in to change notification settings - Fork 516
Docker
ChurchCRM provides a complete Docker-based development environment that includes all necessary services and tools for developing and testing ChurchCRM.
- Docker Desktop (includes Docker Compose)
- Git
- Node.js 20+
-
PHP 8.4+ with extensions:
bcmath,curl,fileinfo,filter,gd,gettext,iconv,mbstring,mysqli,PDO,pdo_mysql,session,sodium,zip,zlib- Ubuntu/Debian example:
sudo apt-get install php php-bcmath php-curl php-gd php-gettext php-mbstring php-mysql php-sodium php-zip - Note: Package names may vary slightly by distribution/repository.
- Ubuntu/Debian example:
- Composer (PHP dependency manager)
Note: PHP and Composer are required on the build host because
npm run deploycompiles PHP dependencies via Composer locally before mounting them into Docker. The Quick Start options (Codespaces, Dev Containers) handle PHP inside Docker automatically.
-
Clone the Repository
git clone https://github.com/ChurchCRM/CRM.git cd CRM -
Install Dependencies
npm ci npm run deploy
-
Start Docker Environment
npm run docker:dev:start
-
Access ChurchCRM
- Application: http://localhost/
-
Default Login:
admin/changeme - Database Admin: http://localhost:8088/ (adminer)
- Mail Server: http://localhost:8025/ (test emails)
The Docker setup includes:
- webserver: Apache with PHP (see System Requirements) with all ChurchCRM code
- database: MariaDB server with sample data
- adminer: Web-based database management interface
- mailserver: SMTP testing server for email functionality
# Development containers
npm run docker:dev:start # Start development environment
npm run docker:dev:stop # Stop development environment
npm run docker:dev:logs # View container logs
npm run docker:dev:login-web # Login to web container
# Testing containers
npm run docker:test:start # Start testing environment
npm run docker:test:stop # Stop testing environment
npm run test # Run Cypress tests- Purpose: Apache web server with PHP and ChurchCRM code
-
Port: 80 (configurable via
DEV_WEBSERVER_PORTindocker/.env) - Access: http://localhost/
- Purpose: MariaDB server with ChurchCRM database
-
Port: 3306 (configurable via
DEV_DATABASE_PORTindocker/.env) -
Credentials:
- Username:
churchcrm - Password:
changeme - Database:
churchcrm - Root password:
changeme
- Username:
- Purpose: Web-based database administration
-
Port: 8088 (configurable via
DEV_ADMINER_PORTindocker/.env) - Access: http://localhost:8088/
- Purpose: SMTP testing server (catches outgoing emails)
-
SMTP Port: 1025 (configurable via
DEV_MAILSERVER_PORT) -
Web UI Port: 8025 (configurable via
DEV_MAILSERVER_GUI_PORT) - Access: http://localhost:8025/
- Make Code Changes: Edit files in your local repository
-
Build Assets: Run
npm run deployto rebuild CSS/JS - Test Changes: Access http://localhost/ to see your changes
-
View Logs: Use
npm run docker:dev:logsto debug issues, or access Admin → System Logs in the UI - Database Access: Use adminer at http://localhost:8088/
Customize ports and settings by creating docker/.env:
DEV_WEBSERVER_PORT=80
DEV_DATABASE_PORT=3306
DEV_ADMINER_PORT=8088
DEV_MAILSERVER_PORT=1025
DEV_MAILSERVER_GUI_PORT=8025For automated testing:
npm run docker:test:start # Start testing containers
npm run test # Run Cypress end-to-end tests
npm run docker:test:stop # Clean up# Rebuild containers
docker compose -f "docker/docker-compose.test-php8-apache.yaml" down
docker compose -f "docker/docker-compose.test-php8-apache.yaml" up -d --build
# View logs
npm run docker:dev:logs# Fix log permissions (run inside container)
npm run docker:dev:login-web
chmod a+rwx src/logs- Access adminer at http://localhost:8088/
- Use credentials listed above
- Database is automatically populated with sample data
- Home
- Wiki → Docs links — User & admin manuals moved to docs.churchcrm.io
→ docs.churchcrm.io for installation & setup
- Installation ← Start here!
- First Run Setup
- Features Overview
→ docs.churchcrm.io for user manuals
- User Guide (docs)
- People Management — docs
- Groups & Events
- Tools
- Finances
→ docs.churchcrm.io for admin manuals
- User Management
- System Maintenance
- Configuration
- Troubleshooting
- Localization
Contributing to ChurchCRM
- Quick Start
- Testing & CI/CD
- Code & Architecture
- Localization
- Release & Security