Prerequisites
Before you begin, ensure you have the following installed on your machine:Docker
Version 20.10 or higher
Docker Compose
Version 2.0 or higher
Docker Desktop includes Docker Compose. On Linux, you may need to install Docker Compose separately.
Installation
Configure environment variables
Each service has an
.env.example file. Copy these to create your local configuration:Start all services
Use Docker Compose to build and start all services:This command will:
- Build Docker images for all 5 microservices
- Start RabbitMQ, Redis, and PostgreSQL
- Start MailHog for email testing
- Set up the Docker network and dependencies
The first build may take 5-10 minutes depending on your internet connection and machine specifications.
Verify installation
Test that services are responding correctly.Check health endpoints
Access management interfaces
RabbitMQ Management
URL: http://localhost:15673Credentials:
- Username:
guest - Password:
guest
MailHog Web UI
URL: http://localhost:8025View all emails sent by the Email Service during testing.
Send your first notification
Now that the system is running, let’s send a test notification.Create a test user
First, register a user in the User Service:Save the
user_id from the response for the next step.Send an email notification
Submit a notification request to the API Gateway:You should receive a response:
Verify email delivery
The email will be processed asynchronously:
- Check the RabbitMQ management UI at http://localhost:15673
- Navigate to Queues tab
- You should see
email.queuewith 1 message processed - Open MailHog at http://localhost:8025
- You should see the welcome email in the inbox
Email processing typically takes 1-3 seconds depending on queue load.
Send a push notification
To test push notifications:Common operations
View service logs
Restart services
Stop services
Rebuild after code changes
Troubleshooting
RabbitMQ health check failing
RabbitMQ health check failing
If RabbitMQ takes too long to start, increase the health check timeout in
docker-compose.yml:Port already in use
Port already in use
If you see “port is already allocated” errors, check for conflicting services:Either stop the conflicting service or modify the port mappings in
docker-compose.yml.Database connection errors
Database connection errors
Ensure PostgreSQL is fully started before services connect:Services have
depends_on configured, but you may need to add health checks for PostgreSQL.Messages stuck in queue
Messages stuck in queue
If messages aren’t being processed:
-
Check worker service logs for errors:
-
Verify workers are connected to RabbitMQ:
- Open http://localhost:15673
- Go to Queues → Click on
email.queue - Check Consumers section
-
Purge the queue if needed (development only):
Environment variables reference
Key environment variables you may want to customize:RabbitMQ
PostgreSQL
Redis
SMTP (Email Service)
Next steps
Now that your system is running:Explore the architecture
Learn how services communicate and data flows through the system
API reference
View detailed API documentation for all endpoints
Configure notification providers
Set up SendGrid, Mailgun, FCM, or OneSignal for production
Deploy to production
Learn about Kubernetes deployment and production best practices