Add Docker support with build and run scripts#66
Merged
Conversation
Create production-grade Dockerfile with multi-stage build, asset precompilation, and non-root user. Add bin/docker-build script to tag images with git SHA and bin/docker-run script to run with Traefik reverse proxy for local development at draft.localhost. Update README with Docker usage instructions covering basic runs and integration with Traefik for multi-project local dev setup. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Store SQLite DB in /rails/data via DATABASE_URL to avoid volume mount overwriting db/ directory (migrations, schema, seeds) - Fix docker-entrypoint to check first two args instead of last two, so db:prepare runs when CMD has extra flags like -b 0.0.0.0 - Make SSL configurable via env vars for local non-HTTPS usage - Simplify bin/docker-run to map ports directly instead of Traefik - Use local production.key for RAILS_MASTER_KEY - Update README with streamlined Docker instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Run Docker container on port 80 so draft.localhost works without specifying a port - Rescue MailerLite errors during signup to prevent 500s when the API key is missing or invalid - Move sqlite3 gem out of dev/test group so it's available in production - Add production.key to .gitignore - Use dig for credential access to avoid NoMethodError on nil Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Added Docker support for containerizing the Rails app for both production deployments and local development with Traefik reverse proxy.
draft.localhostalongside other projects without port conflictsTest plan
bin/docker-buildto verify image builds successfullybin/docker-runand verify app loads athttp://draft.localhost🤖 Generated with Claude Code