Skip to content

chore: split docker compose into base plus dev/prod overrides#51

Merged
igorsatsyuk merged 2 commits into
masterfrom
chore/compose-dev-prod-overrides
Apr 6, 2026
Merged

chore: split docker compose into base plus dev/prod overrides#51
igorsatsyuk merged 2 commits into
masterfrom
chore/compose-dev-prod-overrides

Conversation

@igorsatsyuk
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 6, 2026 05:19
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Splits the Docker Compose setup into a shared base stack plus dev/prod overrides, and updates the README instructions to reflect the new workflow.

Changes:

  • Updated README.md with a new compose-file layout and new DEV/PROD run commands.
  • Adjusted the base compose to use a local Spring profile by default.
  • Added docker-compose.dev.yaml and docker-compose.prod.yaml override files for app-specific dev/prod behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
README.md Documents the new base + dev/prod override compose workflow and updated run/cleanup steps.
docker-compose.yaml Keeps the shared stack and switches SPRING_PROFILES_ACTIVE default to local for the app container.
docker-compose.dev.yaml Introduces a dev override running the app via a Maven container with develop.watch.
docker-compose.prod.yaml Introduces a prod override for building/running the app image with prod-specific env/restart policy.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker-compose.dev.yaml Outdated

services:
jwt-demo:
build: null
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

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

build: null relies on override-merge behavior to “remove” the base build config, but build is expected to be a string or mapping in Compose files. This can make docker compose config/up fail validation (or behave inconsistently across Compose versions). A more robust approach is to remove the build: stanza from jwt-demo in the base docker-compose.yaml and define build only in docker-compose.prod.yaml (while docker-compose.dev.yaml provides the image:).

Suggested change
build: null

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fixed, thanks. I removed build from base docker-compose.yaml, removed build: null from docker-compose.dev.yaml, and kept build only in docker-compose.prod.yaml. I also verified with docker compose config for both base+dev and base+prod.

@igorsatsyuk igorsatsyuk merged commit 834fa71 into master Apr 6, 2026
2 checks passed
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 6, 2026

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.

2 participants