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

Fix Inconsistent DATABASE_URL Configuration in Docker Setup and .env.example #145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Hritul2
Copy link
Contributor

@Hritul2 Hritul2 commented Oct 23, 2024

Overview:

This PR resolves the inconsistency in the DATABASE_URL configuration between the Docker setup instructions in the README.md and the .env.example files.

Changes Made:

  1. Updated Docker Setup in README.md:

    • Modified the Docker command to use postgres for both POSTGRES_USER and POSTGRES_PASSWORD, aligning it with the credentials in the .env.example file:
      docker run -d \
      --name muzer-db \
      -e POSTGRES_USER=postgres \
      -e POSTGRES_PASSWORD=postgres \
      -e POSTGRES_DB=postgres \
      -p 5432:5432 \
      postgres
  2. Improved .env.example Configuration:

    • Added comments in the .env.example file to guide users on switching between Docker and non-Docker setups:
      # When using Docker, use the 'postgres' hostname
      # DATABASE_URL=postgresql://postgres:postgres@postgres:5432/postgres
      
      # For non-Docker setups, use 'localhost'
      DATABASE_URL=postgresql://postgres:postgres@localhost:5432/postgres

Testing:

  • Verified that the updated Docker setup and .env.example configuration work correctly both with and without Docker.
  • Ensured that the application connects to the correct database using the updated DATABASE_URL in both scenarios.

Related Issues:

Notes:

  • If there are any additional feedback or changes required, please let me know!

@Hritul2
Copy link
Contributor Author

Hritul2 commented Oct 23, 2024

Well I am sorry for linting changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue: Inconsistent Postgres Configuration in Docker Setup and .env.example File
1 participant