A script to fastly bootstrap a docker/docker-compose environment for rails application.
RailsC <PATH> [<LOCAL DOMAIN>] [<RAILS OPTIONS>]
PATH: The desired folder name for the Rails app LOCAL DOMAIN: Domain to use with Nginx reverse proxy, Default is App name RAILS OPTIONS: Options to use for Rails new Apps, Default is --database=postgresql
RailsC.sh ~/path/to/app example.io "--force --database=postgresql"
RailsC.sh ./myApp example.io
RailsC.sh exampleApp
docker-compose logs -f
docker exec -t db pg_dump -U postgres -d app_development > app_development_$(date +%d-%m-%Y"_"%H_%M_%S).sql
cat app_development.sql | docker exec -i db psql -U postgres -d app_development
docker-compose exec app rails db:migrate
docker-compose exec app bundle install
- Add Rails template