-
Notifications
You must be signed in to change notification settings - Fork 0
Add local Docker deployment support #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Multi-stage build with official Ruby slim image - PostgreSQL 15 Alpine with multi-database support (cache, queue, cable) - Solid Queue running inline with Puma - Health checks for both web and db services - Resource limits (512M memory) - tmpfs for cache/pids (performance) - Non-root user with explicit UID/GID - OCI image labels for metadata - Comprehensive .dockerignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds comprehensive Docker support for local deployment of the Task Tracker application, enabling single-command setup and deployment using Docker Compose. The implementation follows Docker best practices with multi-stage builds, health checks, and proper resource management.
Changes:
- Docker Compose configuration with PostgreSQL 15 and Rails 8 services
- Multi-database support for Solid Cache, Queue, and Cable
- Complete deployment documentation and troubleshooting guide
- Real portfolio project data replacing example seed data
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
docker-compose.yml |
Defines services for PostgreSQL and Rails web application with health checks and resource limits |
docker/init-databases.sh |
Initializes additional PostgreSQL databases for Rails 8 Solid components |
Dockerfile |
Adds OCI image metadata labels |
config/database.yml |
Adds environment variable configuration for multi-database URLs |
.env.example |
Template for required environment variables |
docs/guides/local-docker-deployment.md |
Comprehensive deployment guide with architecture diagrams and troubleshooting |
db/seeds.rb |
Replaces example data with real portfolio projects and tasks |
db/seeds_example.rb |
Preserves original example seed data for reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove db:migrate from build script (database not accessible during build) - Add preDeployCommand for migrations (runs at deploy time) - Remove explicit database names from cache/queue/cable (use URL only) - Fixes: 'could not translate host name' error on Render
f45d7a5 to
55e8d83
Compare
The bin/brakeman script uses --ensure-latest flag which causes CI to fail when the installed version is not the latest available. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates action_text-trix to 2.1.16 to address GHSA-g9jg-w8vm-g96v (stored XSS vulnerability through attachment attribute). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
This PR adds comprehensive Docker support for local deployment, following Docker best practices.
Features
Docker Compose Setup
Dockerfile Improvements
.dockerignoreNew Files
docker-compose.yml- Full Docker Compose configurationdocker/init-databases.sh- Script to create additional PostgreSQL databasesdocs/guides/local-docker-deployment.md- Deployment guide.env.example- Template for required environment variablesQuick Start
Best Practices Applied
Testing
docker-compose buildsucceedsdocker-compose up -dstarts both services