Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure PostgreSQL in Docker Compose for Django App Integration #17

Open
millad90s opened this issue Jun 19, 2023 · 0 comments
Open
Labels
database Docker related to Docker

Comments

@millad90s
Copy link
Owner

millad90s commented Jun 19, 2023

To establish a connection between our Django application and PostgreSQL, we need to configure PostgreSQL within the Docker Compose environment. This issue focuses on setting up and running a PostgreSQL container using Docker Compose, allowing the Django app to connect to PostgreSQL using localhost:5432.

Goals:

Configure a PostgreSQL container in the Docker Compose file.
Ensure the PostgreSQL container is running and accessible on port 5432 of the local machine.
Set the necessary environment variables and connection parameters for the Django app to connect to the PostgreSQL container.
Verify the successful connection between the Django app and the PostgreSQL database.
Test basic database operations within the Django app to ensure proper integration.
Additional Details:

Utilize the official PostgreSQL Docker image from Docker Hub.
Specify the required version of PostgreSQL in the Docker Compose file.
Provide appropriate database credentials and configuration in the Docker Compose file.
Ensure that the PostgreSQL container is started automatically when running docker-compose up.
Confirm that the Django app is able to connect to the PostgreSQL container using the localhost:5432 hostname and port.
Make sure the necessary PostgreSQL libraries and dependencies are installed within the Django app's environment.
Acceptance Criteria:
The Docker Compose configuration includes a PostgreSQL service/container.
The PostgreSQL container is successfully running and accessible on localhost:5432.
The Django app is configured to connect to the PostgreSQL container using the appropriate connection parameters.
The Django app establishes a successful connection to the PostgreSQL database.
Basic database operations, such as reading and writing data, can be performed within the Django app.

┆Issue is synchronized with this Trello card by Unito

@millad90s millad90s added Docker related to Docker database labels Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Docker related to Docker
Projects
None yet
Development

No branches or pull requests

1 participant