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

Database per service pattern #85

Merged
merged 5 commits into from
Nov 10, 2024
Merged

Database per service pattern #85

merged 5 commits into from
Nov 10, 2024

Conversation

samuelim01
Copy link

Description

Currently all services specify their databases, but on production, they share the full database server without restrictions. Ideally, we would like to implement database-per-service pattern, where data independence is ensured. At the same time, we would like the services to share the same database server, to reduce costs. Hence, we shall enforce these restrictions at the database level using different database users (see this).

Let's,

  • Update the database selection to be dynamically configured through environment variables instead of hardcoded.
  • Remove username and passwords on the Docker databases. Docker is used for development only and does not require authentication. Fixes Fix mongo docker issues #35.
  • Streamline environment files

Checklist

  • I have updated documentation
  • All tests passing

Screenshots (if applicable)

Screenshot 2024-11-08 004634

The username and password will be embedded within the URI
The database will be specified in the URI
@samuelim01 samuelim01 requested a review from McNaBry November 7, 2024 16:49
@samuelim01 samuelim01 self-assigned this Nov 7, 2024
@samuelim01 samuelim01 added this to the Milestone 7 milestone Nov 7, 2024
services/history/.env.sample Outdated Show resolved Hide resolved
Co-authored-by: McNaBry <mcnabry123@gmail.com>
@samuelim01 samuelim01 requested a review from McNaBry November 10, 2024 13:27
Copy link

@McNaBry McNaBry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@samuelim01 samuelim01 merged commit 86d2601 into main Nov 10, 2024
6 checks passed
@samuelim01 samuelim01 deleted the database-per-service branch November 10, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix mongo docker issues
2 participants