feat(infra): add docker-compose support and configure testcontainers#23
Open
nakberli841-bot wants to merge 10 commits into
Open
feat(infra): add docker-compose support and configure testcontainers#23nakberli841-bot wants to merge 10 commits into
nakberli841-bot wants to merge 10 commits into
Conversation
- Add Postgres and Redis configurations to the application.yml files in the api and worker modules. - Remove autoconfigure excludes from the application.yml files.
…and worker - Add spring-boot-testcontainers and testcontainers dependencies to both modules - Implement AbstractIntegrationTest base class for automatic Postgres and Redis setup - Update existing tests to extend AbstractIntegrationTest for isolated test environments - Ensure Flyway and datasource connectivity via @Serviceconnection in integration tests
8 tasks
martian56
requested changes
Jun 12, 2026
martian56
left a comment
Member
There was a problem hiding this comment.
I verified this end to end on my machine: docker compose up brings postgres:16 and redis:7 online, docker compose ps shows both running, and the api and worker jars built from this branch boot against the stack and report UP on their health endpoints. All four checkboxes on #4 hold up, and @Serviceconnection is the right modern way to hook Testcontainers into the tests. Good PR.
Cleanup before merge:
- There is a junk empty file at backend/docker, looks like a shell redirect accident. Remove it, and add a git status skim to your pre-push routine. This is the second PR in a row to ship one of these, and I will be grumpier about the third.
- Coordinate with Arzu: this PR and #21 both rewrite the api application.yml and the api test setup. The plan from my #21 review is that her PR drops its api changes and this one owns the api and worker wiring, so expect a small rebase depending on which lands first. Talk to each other.
- The rest is inline: a version pin that should not exist, health indicator flags that are now wrong, a volume the database needs, and a README paragraph that oversells what compose runs.
One for the future rather than this PR: AbstractIntegrationTest is duplicated identically in api and worker. Fine for two apps, but if a third consumer appears we hoist it into a shared test fixture instead of copying again.
…pi and worker modules.
- Add named volume for database persistence to prevent data loss. - Add pg_isready healthcheck for service readiness. - Sync postgres image tag to 16-alpine for consistency with integration tests.
…connectivity - Setup .env and .env.example for centralized config - Updated .gitignore to exclude sensitive .env file - Refactored docker-compose and application.yml files to use environment variables for DB and Redis connections
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
This PR sets up the Docker development environment and integrates Testcontainers to ensure robust integration testing.
docker-compose.ymlfor Postgres and Redis.AbstractIntegrationTestwith@ServiceConnectionfor automated container management.README.md.Related issue
Closes #4
Area
Screenshots
N/A
Checklist
bun run typecheck && bun run buildinapps/web(for frontend changes)