Skip to content

Feature/130 add db to docker#140

Merged
XtophB merged 4 commits into
developmentfrom
feature/130-add-db-to-docker
May 28, 2026
Merged

Feature/130 add db to docker#140
XtophB merged 4 commits into
developmentfrom
feature/130-add-db-to-docker

Conversation

@XtophB
Copy link
Copy Markdown
Collaborator

@XtophB XtophB commented May 23, 2026

Context

This PR adds a PostgreSQL database to the docker compose file. This allows us to deploy the game with a DB in the future.

Description

  • Add postgres 16 to docker
  • Add volume for persistent storage even when container lifecycle ends
  • Container will now only start when DB is live
  • Add H2 database as a temporary solution for future branches while working on DB creation for persistence. We now have a temporary mock DB in memory for every test suit run.

Changes in the code base

  • pom file now contains new dependencies
  • docker compose file updated to include databse
  • application.yaml creates a localhost database when we run application in IDE
    • This is overwritten when we deploy and containerize as docker compose injects the env postgres url into localhost url
  • We now have in memory database for tests.

Changes outside the code base

N/A

Additional information

N/A

XtophB added 4 commits May 23, 2026 11:54
Backend service will now only start if postgres service has successfully started
Allows @SpringBootTest to run without problem in the future while actual DB is not present.
@sonarqubecloud
Copy link
Copy Markdown

@XtophB XtophB marked this pull request as ready for review May 25, 2026 19:10
Copy link
Copy Markdown
Collaborator

@tasaje1 tasaje1 left a comment

Choose a reason for hiding this comment

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

lgtm 👍🏻👍🏻

Copy link
Copy Markdown
Collaborator

@the-only-queen-anna the-only-queen-anna left a comment

Choose a reason for hiding this comment

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

LGTM, hibernate db eingebunden

@XtophB XtophB merged commit 9dc0ae8 into development May 28, 2026
3 checks passed
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.

3 participants