POC: deploy via Docker context with bind mount rewrite#112
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request represents a significant architectural change to the deployment mechanism, switching from remote script execution to Docker context over SSH for compose operations. The PR introduces automatic HTTPS support via Caddy + Let's Encrypt through a new proxy_tls input option and includes comprehensive test coverage for the new features.
Changes:
- Replaces remote shell script deployment with Docker context-based deployment over SSH
- Adds automatic HTTPS proxying via Caddy when
proxy_tlsis configured - Implements bind mount path rewriting for relative paths under app_path, rejecting paths outside app_path
- Extracts registry credential parsing into a dedicated module with tests
- Removes ARM64 support, limiting to Linux AMD64 only
- Updates build process to use UPX compression and auto-commit dist binaries
- Adds comprehensive smoke testing workflow with database persistence validation
Reviewed changes
Copilot reviewed 30 out of 33 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/pullpreview/deploy_context.go | New Docker context deployment implementation with SSH host alias injection and compose config manipulation |
| internal/pullpreview/proxy_tls.go | Automatic HTTPS proxy injection with Caddy, validates service names and detects port 443 conflicts |
| internal/pullpreview/registries.go | Extracted registry credential parsing from pre_script.go for better testability |
| internal/pullpreview/instance.go | Updated to support proxy_tls, forcing port 443 and HTTPS URLs when enabled; removed update script setup |
| internal/pullpreview/up.go | Updated to pass appPath to UpdateFromTarball |
| internal/pullpreview/*_test.go | Comprehensive test coverage for new features including bind mount rewriting, proxy TLS, and GitHub sync |
| internal/pullpreview/update_script.go | Removed (replaced by Docker context approach) |
| internal/pullpreview/templates/update_script.sh.tmpl | Removed (replaced by Docker context approach) |
| action.yml | Added proxy_tls input; restricted to Linux AMD64 only with explicit error messages |
| .github/workflows/pullpreview.yml | Added two-stage smoke test validating deployment, HTTPS URLs, and database persistence |
| examples/workflow-smoke/* | New smoke test application with Flask, MySQL, and bind mount usage |
| Makefile | Updated to build only amd64, added UPX compression and auto-commit workflow |
| go.mod/go.sum | Updated Go version to 1.23.8 and oauth2 dependency to v0.29.0 |
| README.md, AGENTS.md, MIGRATION_PLAN.md | Updated documentation for proxy_tls feature and architecture changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Deploying action with ⚡ PullPreview
|
Deploying action with ⚡ PullPreview
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
ok github.com/pullpreview/action/internal/github (cached)
ok github.com/pullpreview/action/internal/license (cached)
ok github.com/pullpreview/action/internal/providers/lightsail (cached)
ok github.com/pullpreview/action/internal/pullpreview (cached)