Welcome to Railcar, a quick-start Rails 7 solution, specifically designed to work with the Railroad server configuration.
Railcar is a fully setup Rails 7.0.8 application and the the companion to the Railroad Ansible project. It provides you with a Docker-free setup to kickstart your Rails application development.
- Rails 7.0.8
- Tailwind CSS
- Authentication with Devise 4.9
- Deployment ready with Capistrano
- Postgresql
- Unicorn
- Ruby 3.1.2
To get started with Railcar:
Download or clone both the Railcar and Railroad repositories.
- Set up your Ubuntu server using the Railroad Ansible project to ensure compatibility.
- In the Railcar repository, navigate to
config/deploy/production.rb
and update it with your server's IP address. - In the deployment script,
config/deploy.rb
, update therepo_url
with the URL to your repo.
In Railcar, environment variables are handled by Railroad. It's worth noting that Railcar does not use Rails' built-in credentials.yml
file for environment management. Ensure that your copy of the Railroad repo has env vars defined in and copied over to the .env
file on the remote host.
pkill ssh-agent && eval `ssh-agent` && ssh-add ~/.ssh/id_rsa
SSH into your server, ssh [email protected]
, and run ssh -T [email protected]
to ensure your keys are forwarded to Github.
From the root of the app, first run bundle exec cap production deploy:setup
to setup the directories on the remote host, and then run bundle exec cap production deploy
to deploy the app.
From the root of the app run bundle exec cap production deploy
or use the helper make deploy
. By default capistrano
will deploy the main
branch from your git repo.
Railcar is open-source software, licensed under The MIT License.
For support and additional queries, please contact [email protected].
Note: Railcar is designed to be used in conjunction with the Railroad Ansible project. For optimal results, deploy Railcar to a server configured using Railroad.