Add Dockerfile to deployment options #626
Merged
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.
This is a 🔦 documentation change.
Summary
This PR adds documentation for Dockerfile-based deployments, which should cover a huge number of additional deployment options (Fly.io, Render/Heroku without buildpacks, Railway, etc).
Context
This uses a multi-stage build that I've confirmed to work with my (relatively simple) personal site on Fly.io(https://stephen-dolan.fly.dev). There are a few advantages to multi-stage builds:
ruby:alpine
image.I'd welcome any tips regarding how to more effectively/minimally build a site for production use. I think there's value in keeping the Dockerfile simple enough for folks to run with and modify on their own, but even some comments with potential alternatives for folks running different setups (like webpack) might be nice!
This means your site is running as an app, so it's more expensive than running a free static site that many services (Netlify, Render, etc) can detect. That said, it gives you tons of flexibility and a lot more options for providers.