Skip to content

hoangphuc1723/order-management-system

Repository files navigation

Order Management System with MongoDB and Mosquitto

This project sets up an Order Management System using Docker Compose. It includes a web application, a MongoDB database, and a Mosquitto MQTT broker.

Prerequisites

Make sure you have the following installed on your system:

Mosquitto Configuration

Ensure you have a mosquitto.conf file inside the mosquitto directory. Here is an example configuration:

mosquitto.conf

persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log

listener 1883
allow_anonymous true

How to Run

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

Access the web application:

The web application will be accessible at http://localhost:8080/web.

Stopping the Services

To stop the running services, use the following command:
docker compose down

Logs and Data

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.

Troubleshooting

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

Additional Notes

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published