Welcome to Railed, a Ruby On Rails boilerplate project designed for production use. This boilerplate comes pre-configured with Nginx, HTTP/2, and QUIC (HTTP/3) support to ensure optimal performance and security. Additionally, Railed contains a carefully curated list of pre-installed must-have Rails gems, streamlining the development process for building robust and feature-rich applications.
For exact list of ruby gems installed please check Gemfile
.
-
Nginx with HTTP/2 and QUIC Support: Industry-standard web server known for its high performance, stability, and efficient handling of static and dynamic content. Take advantage of HTTP/2 for faster communication and embrace the future of the web with QUIC, a next-generation transport layer protocol designed to enhance speed and security.
-
Docker and Docker-Compose: Easily manage and deploy your application using Docker containers, with a separate docker-compose.yml file for each environment (development, testing, and production).
-
Stimulus and Turbo: Leverage the power of Stimulus for lightweight and modern JavaScript controllers, and Turbo to enhance the user experience by enabling seamless, fast navigation between pages.
-
Tailwind CSS with Flowbite UI Components: Utilize the flexibility and utility-first approach of Tailwind CSS, along with the Flowbite UI components, to expedite the styling process and ensure a modern, responsive design.
You don't have to touch Dockerfile
because all system libraries for gems are already installed unless you added some gems that requires install some system c libs or something.
- Generate new
master key
by simply runningbin/rails runner 'puts ActiveSupport::EncryptedFile.generate_key
and put this key into.env
. - Fill up things in
credentials.yml.enc
like inconfig/credentials.yml.example
- Open
.env
and fill rest of the things expectDATABASE_HOST
andREDIS_HOST
unless you know what you're doing.
- Open
init.sql
and fill the init script with user and password that you will refer later in you application. TODO: read.env
ininit.sql
to keep everything in.env
After that your app should run without any problems. If you experience any problems with this boilerplate please open an issue and describe everything, I'll try to help you out!
The Nginx configuration files are located in the ./proxy
directory. Adjust the settings according to your production environment. Replace the default localhost.crt and private.key files with your own SSL/TLS certificate and private key.
docker-compose -f docker-compose.dev.yml up
docker-compose exec -e RAILS_ENV=test app bin/rspec
Special thanks to the Ruby on Rails, Nginx, Stimulus, Turbo, Tailwind CSS, and Docker communities for their invaluable contributions.
Happy coding with Railed! 🚀