Docker Development Setup
Complete guide to setting up Chatwoot development environment using Docker and Docker Compose.
Docker Development Setup
This guide will help you set up a complete Chatwoot development environment using Docker and Docker Compose.
Pre-requisites
Before proceeding, make sure you have the latest version of docker and docker-compose installed.
As of now, we recommend a version equal to or higher than the following:
Install Docker
Windows
- Download Docker Desktop from https://www.docker.com/products/docker-desktop/
- Run the installer and follow setup instructions
- Enable WSL2 backend (recommended)
- Restart your computer when prompted
macOS
Linux (Ubuntu/Debian)
After adding yourself to the docker group on Linux, log out and log back in for the changes to take effect.
Development Environment
-
Clone the repository.
-
Make a copy of the example environment file and modify it as required.
-
Build the images.
-
After building the image or destroying the stack, you would have to reset the database using the following command.
-
To run the app:
- Access the rails app frontend by visiting
http://0.0.0.0:3000/ - Access Mailhog inbox by visiting
http://0.0.0.0:8025/(You will receive all emails going out of the application here)
Login with credentials
- Access the rails app frontend by visiting
-
To stop the app:
Running RSpec Tests
For running the complete RSpec tests:
For running specific test:
Production Environment
To debug the production build locally, set SECRET_KEY_BASE environment variable in your .env file and then run the below commands:
Debugging Mode
To use debuggers like byebug or binding.pry, use the following command to bring up the app instead of docker compose up:
Development Workflow
Daily Development Commands
Troubleshooting
If there is an update to any of the following:
dockerfilegemfilepackage.json- schema change
Make sure to rebuild the containers and run db:reset.
Common Issues
Getting Help
If you encounter Docker-specific issues:
- Docker Documentation: https://docs.docker.com/
- Docker Compose Reference: https://docs.docker.com/compose/
- Chatwoot Issues: GitHub Issues
- Community Support: Discord
Your Docker development environment is now ready for Chatwoot development! 🐳
Show your support! Star us on GitHub ⭐️