This project demonstrates how to set up a multi-service environment using Docker Compose. It includes both front-end and back-end services that work together seamlessly.
To run this project on your local machine, follow the steps below:
Start by cloning the repository to your local machine:
git clone https://github.com/Horadmard/Docker-Compose
Once the repository is cloned, navigate into the project folder:
cd Docker-Compose
Use Docker Compose to build and start the containers:
docker compose up --build
This command will build the Docker images and start the services defined in the docker-compose.yml
file.
After a few seconds, once the services are running, open your browser and visit:
http://localhost
You should see the front-end of the application.
- Frontend: React application running on port 4200.
- Backend: NestJS API that communicates with a PostgreSQL database.
Ensure you have the following installed on your machine before running the project:
- Docker
- Docker Compose
-
If you encounter any issues with the services, try restarting the containers:
docker compose down docker compose up --build
-
For database connection errors, ensure that the PostgreSQL service is running and check the environment variables in the
docker-compose.yml
file.
Feel free to open issues or submit pull requests for improvements or bug fixes.
This project is licensed under the MIT License.