satorix-rails
Satorix is a full-featured CI/CD pipeline developed by Internet Exposure.
The satorix-rails gem provides a streamlined mechanism for a 12-factor capable Rails application to interact with the Satorix ecosystem.
Getting Started
Add Satorix to your Rails application by including it in your Gemfile with:
source 'https://gems.iexposure.com' do
gem 'satorix-rails'
end
Run the bundle command to install it.
Next, run the generator from a terminal at the root of your application:
$ rails g satorix:install
Congratulations, your application is now suitable for deployment into Satorix.
Logging in Rails 4 and below
If you are using Rails version 4 or below, you will need to take an additional step so that your application logs correctly.
You will need to either:
- add
gem 'rails_12factor', group: :productionto your Gemfile - Set
config.logger = Logger.new(STDOUT)inconfig/environments/production.rb
What's Included
Environment Variables
You can configure your application on a per-environment basis using environment variables.
The following environment variables are used by the generated files:
Using the Satorix Dashboard? You can relax, all of these variables are automatically configured for you.
SATORIX_AUTHENTICATION_USER_NAMES_AND_PASSWORDS
Optional
Hashed usernames:passwords, newline separated
SATORIX_AUTHENTICATION_ALLOWED_IPS
Optional
Valid settings:
- all (
all) - single IP (
192.168.101.2) - single IP range (
192.168.101.0/24) - multiple IPs/ranges (
192.168.101.3 192.168.1.4)
SATORIX_CANONICAL_URI_HOST
Optional
If specified, t
SATORIX_CANONICAL_URI_PROTOCOL
Optional
SATORIX_PROXY_IPS
was NGINX_ADDITIONAL_REAL_IPS
Used to define proxy IP addresses, for services like CloudFlare.
Contributing
Please coordinate contributions using the official issue tracker.
Testing
This application is tested using rspec.
You can run the same tests that run during CI with:
bundle exec rspec spec
CI/CD
Satorix is used to provide continuous integration and continuous deployment for this application.
CI is run against every push.
CD is used to build and publish the gem for the master branch.
License
The Satorix gem is released under the terms described in the LICENSE file.