/rails_on_docker

Dockerized rails template

Primary LanguageDockerfile

Create a new rails app using

  1. Rename .env.example with you own values

  2. Create your src directory

mkdir src
  1. Run the following command to generate a new rails app
docker-compose run --rm webapp rails new . -d postgresql
  1. Replace database with database.yml.example
cp database.yml.example src/config/database.yml
  1. Create databases
docker-compose run --rm webapp rails db:create
  1. Run rails server
docker-compose up