This project sets up an Order Management System using Docker Compose. It includes a web application, a MongoDB database, and a Mosquitto MQTT broker.
Make sure you have the following installed on your system:
Ensure you have a mosquitto.conf
file inside the mosquitto
directory. Here is an example configuration:
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
listener 1883
allow_anonymous true
Follow these steps to set up and run the project:
- Clone the repository:
git clone https://github.com/hoangphuc1723/order-management-system
cd order-management-system
- Build and start the containers:
docker compose up -d
The web application will be accessible at http://localhost:8080/web.
To stop the running services, use the following command:
docker compose down
MongoDB data is stored in a Docker volume named mongo-data. Mosquitto data and logs are stored in the ./mosquitto/data and ./mosquitto/log directories, respectively.
If you encounter issues, you can check the logs of the individual services:
docker-compose logs order-management-system-app
docker-compose logs mongo
docker-compose logs mosquitto
Ensure the mosquitto directory and its subdirectories (data and log) have the appropriate permissions. You can customize the Mosquitto configuration by editing the mosquitto.conf file.