Espocrm
Overview
This guide covers the deployment and configuration of EspoCRM using Docker Compose behind Traefik reverse proxy. EspoCRM serves as Mondo’s customer relationship management solution, accessible at crm.trymondo.com
.
Architecture
EspoCRM is deployed as a multi-container application with the following components:
- MariaDB: Database server storing EspoCRM data
- EspoCRM: Main application container
- EspoCRM Daemon: Background process container
- EspoCRM WebSocket: Real-time communications container
All services use the external traefik-net
network for routing through Traefik.
Prerequisites
- Docker Engine (24.0+)
- Docker Compose v2
- Traefik reverse proxy configured and running
- External
traefik-net
network - DNS configured for
crm.trymondo.com
Deployment
Directory Structure
Environment Variables
Create a .env
file with the following variables:
Never commit the .env
file to version control. Store passwords securely in
your password manager.
Docker Compose Configuration
The deployment uses a shared image reference and multiple service definitions:
Deployment Commands
Deploy the stack with:
Verify all components are running:
Configuration Highlights
Traefik Integration
EspoCRM is configured with the following Traefik routing:
- Main application at
crm.trymondo.com
- WebSocket endpoint at
crm.trymondo.com/ws
- TLS certificate managed by Traefik’s
production
resolver - Security headers applied through Traefik middleware
WebSocket Configuration
Real-time communication is enabled through ZeroMQ and WebSockets:
- WebSocket URL:
wss://crm.trymondo.com/ws
- Internal ZeroMQ communication between containers
- Separate Traefik router rule for WebSocket traffic
Volume Management
The deployment uses Docker named volumes:
mariadb-data
: Persistent storage for the databasehtml-data
: Shared volume for EspoCRM application data across all containers
Maintenance
Backup Strategy
EspoCRM data should be backed up regularly using Restic/Backrest:
Updates
To update EspoCRM:
- Update the image version tag in
docker-compose.yml
- Pull the new image:
- Deploy the updated stack:
- Check logs for any migration issues:
Troubleshooting
Database Connection Issues
If EspoCRM can’t connect to the database:
- Check MariaDB container status:
- Verify network connectivity:
- Check database credentials:
WebSocket Issues
If real-time updates aren’t working:
- Check WebSocket container is running:
- Verify WebSocket URL configuration matches the Traefik route.
- Test WebSocket connectivity from browser developer tools.
Traefik Routing Problems
If the site is unreachable:
- Check Traefik logs:
- Verify DNS resolution for
crm.trymondo.com
- Confirm Traefik network is correctly attached to all containers.
Resources
Next Steps
- Set up monitoring and alerting for EspoCRM services with Prometheus/Grafana
- Implement automated backups of volumes and database dumps
- Configure SMTP for email notifications
- Explore EspoCRM API integrations with other Mondo services
Was this page helpful?