This repository contains a Python program that connects to a PostgreSQL database and a RabbitMQ message broker using Docker Compose.
Make sure you have the following software installed on your machine:
- Docker: Install Docker
- Docker Compose: Install Docker Compose
-
Clone this repository to your local machine:
git clone https://github.com/your_username/your_repository.git
-
Navigate to the project directory:
cd your_repository -
Open the
docker-compose.ymlfile and replace the following placeholders with your own values:your_postgres_user: Replace with your desired PostgreSQL username.your_postgres_password: Replace with your desired PostgreSQL password.your_database_name: Replace with the name of your PostgreSQL database.your_rabbitmq_user: Replace with your desired RabbitMQ username.your_rabbitmq_password: Replace with your desired RabbitMQ password.
-
Build and start the containers:
docker-compose up
This command will build the Python app container based on the Dockerfile and start the PostgreSQL and RabbitMQ containers. The Python app container will automatically connect to the other containers based on the specified dependencies and links.
The program output will be displayed in the console.
-
To stop the containers, press
Ctrl + C.
Contributions are welcome! If you want to contribute to this project, please follow these steps:
- Fork this repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your changes to your forked repository.
- Submit a pull request to this repository.
This project is licensed under the MIT License.