Skip to content

Conversation

@cfsmp3
Copy link
Collaborator

@cfsmp3 cfsmp3 commented Jan 19, 2026

Summary

  • Adds production/docker-compose.production.yml that binds all service ports to localhost only
  • Updates production/README.md to use the override file instead of manual editing
  • Adds useful production commands (logs, restart, rebuild)

Changes

New file: production/docker-compose.production.yml

Uses !override YAML tag to replace port arrays (not merge them). Requires Docker Compose v2.24.0+.

Service Development Production (with override)
frontend 80:80 127.0.0.1:3000:80
backend 8000:8000 127.0.0.1:8000:8000
syncserver 8080:8080 127.0.0.1:8081:8080

Usage:

docker compose -f docker-compose.yml -f production/docker-compose.production.yml up -d

Why

  • Keeps the base docker-compose.yml unchanged for development
  • Provides a versioned production configuration (no more manual edits on VPS)
  • Makes it easier to update VPS by just pulling changes

Test plan

Note: Initially tried !reset but it clears arrays without applying new values. !override works correctly.

🤖 Generated with Claude Code

Creates production/docker-compose.production.yml that binds all service
ports to localhost only, allowing nginx to handle external traffic.

Changes:
- Add docker-compose.production.yml with localhost-only port bindings:
  - frontend: 127.0.0.1:3000:80
  - backend: 127.0.0.1:8000:8000
  - syncserver: 127.0.0.1:8081:8080

- Update production/README.md:
  - Replace manual docker-compose.yml editing with override file usage
  - Add useful production commands (logs, restart, rebuild)

Usage:
  docker compose -f docker-compose.yml -f production/docker-compose.production.yml up -d

This keeps the base docker-compose.yml unchanged for development while
providing a versioned production configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link

Thank you for opening this PR!

Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools.

Please take a moment to:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

More information on how to conduct a self review:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request

This helps make the review process smoother and gives us a clearer understanding of your thought process.

Once you've added your self-review, we'll continue from our side. Thank you!

Without !override, Docker Compose merges the port arrays, resulting in
both public and localhost-only ports being exposed. The !override tag
ensures the production ports completely replace the development ones.

Note: !reset clears to empty but doesn't apply the new values in some
Docker Compose versions. !override works correctly.

Requires Docker Compose v2.24.0+ (Compose Spec 2.1)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cfsmp3 cfsmp3 force-pushed the docker/production-compose-override branch from f2df3eb to daf7375 Compare January 19, 2026 21:22
@its-me-abhishek its-me-abhishek merged commit d5f57ae into main Jan 21, 2026
5 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