This is a Ruby on Rails application template.
Simple. Create a new app by running:
rails new -m https://raw.githubusercontent.com/sinaptia/insert-coin/main/template.rb -d postgresql -a propshaft --skip-hotwire --skip-jbuilder -T -j esbuild -c tailwind APP_NAME
You can also clone this repository and run locally. Useful if you're experimenting or want so change something.
If you don't have ruby installed natively and rely only in docker for local development, you can also run use this template. There are a few more steps, though:
docker run -it -v $PWD:/app -w /app --rm ruby:3.2-alpine sh -c 'apk add --no-cache --update build-base git imagemagick linux-headers nodejs npm postgresql-dev tzdata yarn && gem install rails && rails new -m https://raw.githubusercontent.com/sinaptia/insert-coin/main/template.rb -d postgresql -a propshaft --skip-hotwire --skip-jbuilder -T -j esbuild -c tailwind APP_NAME'
It creates a new rails 7 app with these features:
- docker for local development
- postgresql db
- propshaft (new asset pipeline)
- jsbundling-rails (esbuild)
- cssbundling-rails
- tailwind
- no hotwire
- no jbuilder
- rspec-rails
- shoulda-matchers
- factory_bot_rails
- faker
- dotenv-rails
- devise
- devise-i18n
- omniauth-facebook (optional)
- omniauth-google-oauth2 (optional)
- pundit (optional)
- good_job (background jobs, optional)
- rails-i18n
- standard ruby
- standard js
- react
- mount-react-components
After running the rails new
command you should have a rails 7 app with all of the above already set up. You only need to run:
bundle exec rails db:create db:migrate
and you can start working on your brand new app!
You need to run:
docker-compose build web
docker-compose run web bundle
docker-compose run web yarn install
docker-compose run web rails db:create db:migrate
docker-compose up