chore: split docker compose into base plus dev/prod overrides#51
Conversation
There was a problem hiding this comment.
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.mdwith a new compose-file layout and new DEV/PROD run commands. - Adjusted the base compose to use a
localSpring profile by default. - Added
docker-compose.dev.yamlanddocker-compose.prod.yamloverride 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.
|
|
||
| services: | ||
| jwt-demo: | ||
| build: null |
There was a problem hiding this comment.
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:).
| build: null |
There was a problem hiding this comment.
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.
|



No description provided.