Docker based Rails development environment for macOS
Depends on docker-sync to share source code between host and containers, which is the most performant way currently
Copy them manually or:
- Clone this repository into directory next to the directory of your project
cd
into your project directory- Run
../docker-rails-development/install
- Update Ruby version at the first lines of
*.docker
files
- Docker for Mac
- docker-sync for fast access to local code from containers
-
Make sure all the required gems (such as Spring and Sidekiq, for example) are in the
Gemfile
, then run:docker-sync start docker-compose run --rm spring bundle install
Run one of the following commands to generate a new Rails application. Arguments are passed to the call of the rails new
command. Customize them as needed.
# Use current directory name as application name by default
../docker-rails-development/rails-new --database=postgresql --skip-git --skip-test
Or
../docker-rails-development/rails-new custom_app_name --database=postgresql --skip-git --skip-test
You can also refer to the help:
../docker-rails-development/rails-new --help
# Docker
/.docker-sync/
/config/solargraph_hints.rb