build(config): Use dynamic port mapping for docker-compose#33
build(config): Use dynamic port mapping for docker-compose#33filiperochalopes wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bf69d9549
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| CLAUDE.md | ||
|
|
||
| # Local override files | ||
| docker-compose.override.yml |
There was a problem hiding this comment.
Restore an automatic dev compose path
For a clean checkout, this ignore entry plus the rename to docker-compose.override.yml.bak means docker-compose up -d no longer sees the dev override that used to set target: build, bind-mount the source, and expose hot-reload/storybook ports; the README still documents that command as “Run Dev”. Docker’s Compose docs say default up reads the override file automatically (https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/), so please either keep a committed dev compose file with an explicit README command or add setup docs to copy the .bak template.
Useful? React with 👍 / 👎.
| PRIVATE_PACKAGES_GIT: | ||
| ports: | ||
| - "4002:4002" | ||
| - "${WEB_PORT-4002}:4002" |
There was a problem hiding this comment.
Propagate WEB_PORT through SSO compose
When developers use the README’s SSO command (docker-compose -f docker-compose.yml -f docker-compose.sso.yml up -d) and set WEB_PORT to avoid a local 4002 conflict, this new dynamic mapping is merged with the SSO file’s still-hardcoded 4002:4002 and LOGIN_REDIRECT_URL=http://localhost:4002, so the SSO path still binds and redirects to 4002. Docker’s Compose docs describe multiple -f files as combined in order with ports added/merged (https://docs.docker.com/compose/how-tos/multiple-compose-files/merge/), so the SSO compose file needs the same variable or an updated command.
Useful? React with 👍 / 👎.
|
Love this idea, but not technical enough to approve it :) Reassigning to Sunny! |
For development it's better to use the port better suits your env. Yes, you can also use override, but not a versioned one. Not a good practice to keep override compose file versioned.