Skip to content

feat: add docker:publish command [sc-636] - #24

Merged
roble merged 1 commit into
mainfrom
renanroble-sc-636-add-command-to-publish-docker-files-on-the
Sep 5, 2026
Merged

roble merged 1 commit into
mainfrom
renanroble-sc-636-add-command-to-publish-docker-files-on-the

Conversation

@roble

@roble roble commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds saucebase docker:publish so the Docker files can be published (or refreshed) into an existing Saucebase app without running the full install flow.

  • --path= target app directory (defaults to cwd)
  • existing files prompt before being overwritten; --force skips the prompt
  • --ssl=no publishes the plain-HTTP nginx config

DockerEnvironment::publishStubs() now delegates to the command, so there is a single copy path. It calls it non-interactively (the confirm defaults to "no", keeping existing files) and deliberately does not pass install's --force through — re-running install never clobbers a user's Docker files.

Tests

New PublishDockerCommandTest: publishes all five stubs, keeps existing files, --force overwrites, and both SSL nginx variants. Full suite: 202 tests / 396 assertions passing.

Story: https://app.shortcut.com/saucebase/story/636

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added the docker:publish command to publish Docker configuration files to an application directory.
    • Added options to control overwriting existing files and SSL-enabled versus plain-HTTP nginx configuration.
  • Improvements
    • Docker installation now uses the publishing command non-interactively, applying the selected SSL configuration automatically.
  • Documentation
    • Documented the new command and its available options.
  • Tests
    • Added coverage for file publishing, overwrite behavior, and SSL configuration selection.

Adds `saucebase docker:publish` so Docker files can be published (or
refreshed) in an existing app without running the full install flow.
Existing files prompt before being overwritten; --force skips the prompt
and --ssl=no publishes the plain-HTTP nginx config.

DockerEnvironment::publishStubs() now delegates to the command so there
is a single copy path. It calls it non-interactively and does not pass
install's --force through, so re-running install still keeps existing
Docker files.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 8ce4de6b-4e72-49ba-989a-dbedc1ea7754

📥 Commits

Reviewing files that changed from the base of the PR and between 8206188 and bddd04d.

📒 Files selected for processing (5)
  • CLAUDE.md
  • src/Console/Application.php
  • src/Console/Commands/PublishDockerCommand.php
  • src/Environments/DockerEnvironment.php
  • tests/Feature/PublishDockerCommandTest.php

📝 Walkthrough

Walkthrough

The change adds docker:publish, registers it with the console application, integrates it into Docker installation, and adds tests for file creation, overwrite handling, and SSL configuration selection.

Changes

Docker publication

Layer / File(s) Summary
Publish Docker command
src/Console/Commands/PublishDockerCommand.php, src/Console/Application.php, tests/Feature/PublishDockerCommandTest.php, CLAUDE.md
Adds and registers docker:publish. The command publishes Docker files, preserves existing files unless forced, and selects SSL or plain-HTTP nginx configuration. Feature tests cover these behaviors.
Docker installation integration
src/Environments/DockerEnvironment.php, CLAUDE.md
Docker installation invokes docker:publish with the install path and the current SSL mode.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DockerEnvironment
  participant ConsoleApplication
  participant PublishDockerCommand
  participant ApplicationFilesystem
  DockerEnvironment->>ConsoleApplication: invokes docker:publish with path and SSL mode
  ConsoleApplication->>PublishDockerCommand: dispatches command
  PublishDockerCommand->>ApplicationFilesystem: publishes Docker stubs
  PublishDockerCommand->>ApplicationFilesystem: selects nginx SSL or plain-HTTP configuration
Loading
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch renanroble-sc-636-add-command-to-publish-docker-files-on-the

Warning

Some tools did not complete. Review the errors below.

🔧 PHPStan (2.2.8)

Composer install failed: the CodeRabbit sandbox could not download one or more dependencies.
This usually means the project resolves packages from a private registry, a self-hosted Satis/Repman instance, or an SSH-gated repository that the sandbox cannot reach.
If your project requires private packages, disable the PHPStan tool in your coderabbit settings.

Instead, run PHPStan in a CI/CD pipeline where you can use custom packages — our pipeline remediation tool can use the PHPStan output from your CI/CD pipeline.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@roble
roble merged commit 3385f9f into main Sep 5, 2026
2 of 3 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.

1 participant