RAILS_APP_NAME=myapp
git clone [email protected]:joaocosta/docker-rails-pg.git $RAILS_APP_NAME
cd $RAILS_APP_NAME
rm -fR .git
sed -i s/myapp/$RAILS_APP_NAME/g database.yml docker-compose.yml Dockerfile .env.*
docker-compose run web rails new . --force --database=postgresql --skip-bundle
vi Gemfile
docker-compose build
mv database.yml config/database.yml
docker-compose run web rake db:create
docker-compose up -d
echo $RAILS_APP_NAME >> .gitignore
git init .
git add -A
git commit -m "Initial commit"