This repo contains the boilerplate code required to initialise a Rails app using Docker.
In order for this to be of any use, you will need to have the following installed on your machine:
First clone the repo (replacing YOUR_APP_NAME
with the name of your app), and remove the git
history.
git clone git@github.com:gtm19/rails-docker.git YOUR_APP_NAME
cd YOUR_APP_NAME
The following will create a boilerplate Rails app, with simpleform
, bootstrap
, and devise
all locked and loaded by default.
./init.sh
You can (optionally) provide a different template as follows:
./init.sh --template minimal_docker
The only options at the moment are:
minimal_docker
devise_docker
(default)
See here for the source.
You can optionally choose a name for your app by adding it as an unflagged argument.
By default, it will use the name of the working directory from where ./init.sh
is called.
./init.sh my-way-cool-app
Changes to either the Gemfile
or the Dockerfile
will require a rebuild. This includes the changes which are caused by creating a new app.
docker-compose build
docker compose up
If you make changes to the Gemfile or the Compose file to try out some different configurations, you need to rebuild.
Some changes require only
docker compose up --build
...but a full rebuild requires:
docker compose run web bundle install
docker compose up --build
docker compose down