Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding support for castronaut binary to write sample vhost configurat…

…ion file
  • Loading branch information...
commit ede7613ed27f38670ad0ea0f8ee86e2abb643363 1 parent e65e4fe
Aaron Bedra authored
View
2  Rakefile
@@ -11,7 +11,7 @@ require "fileutils"
gem :flog
-CURRENT_VERSION = '0.5.3'
+CURRENT_VERSION = '0.5.4'
$package_version = CURRENT_VERSION
desc "Run all examples with RCov"
View
10 bin/castronaut
@@ -11,12 +11,10 @@ require 'optparse'
options = {}
OptionParser.new do |opts|
opts.banner = "Usage: castronaut [Options] {/path/to/config/file}\n"
- opts.banner += "\t -C: \t\tStart castronaut using the specified config file.\n"
opts.banner += "\t --config: \tStart castronaut using the specified config file.\n"
- opts.banner += "\t -F: \t\tWrite the castronaut default sample config file to the specified location.\n"
opts.banner += "\t --fresh: \tWrite the castronaut default sample config file to the specified location.\n"
- opts.banner += "\t -S: \t\tCreate a sample development database with users for testing.\n"
opts.banner += "\t --sampledb: \tCreate a sample development database with users for testing.\n"
+ opts.banner += "\t --nginx: \tWrite the sample nginx configuration file to the specified location.\n"
opts.on("-h", "--help") do
puts opts.banner
@@ -38,6 +36,12 @@ OptionParser.new do |opts|
Castronaut::Support::Sample.create_sample_database
exit(1)
end
+
+ opts.on("-N", "--nginx") do
+ FileUtils.cp(File.join(File.dirname(__FILE__), '..', 'config', 'nginx_vhost.conf'), "#{ARGV[0]}/castronaut.conf")
+ puts "Writing nginx vhost configuration file to #{ARGV[0]}/castronaut.conf"
+ exit(1)
+ end
end.parse!
unless Castronaut.config
View
2  castronaut.gemspec
@@ -3,7 +3,7 @@ files << Dir["lib/**/*", "app/**/*", "spec/**/*", "config/**/*", "vendor/**/*"]
Gem::Specification.new do |s|
s.name = 'castronaut'
- s.version = "0.5.3"
+ s.version = "0.5.4"
s.summary = 'CAS Server'
s.description = "CAS Server"
s.files = files.flatten
View
11 config/nginx_vhost.conf
@@ -1,16 +1,10 @@
-# If you are using thin with sockets
upstream castronaut {
- server unix:/tmp/castronaut.0.sock;
+ server 127.0.0.1:4567;
}
-# Uncomment if you are not using sockets
-# upstream castronaut {
-# server 127.0.0.1:4567;
-# }
-
server {
listen 80;
- server_name myapp.com;
+ # server_name cas.example.com;
location / {
proxy_pass http://castronaut;
@@ -18,7 +12,6 @@ server {
proxy_set_header Host $host;
}
- root /path/to/castronaut/;
access_log /var/log/nginx/castronaut/access.log;
error_log /var/log/nginx/castronaut/error.log;
}
View
7 doc/deployment/ubuntu-with-nginx.textile
@@ -35,5 +35,10 @@ of these instructions should not change if you are using the desktop version.
8.3) castronaut -C castronaut.yml
8.4) Go to http://localhost:4567
8.5) Login with username admin and password admin
-
+9) Install Nginx
+ 9.1) sudo apt-get install nginx
+10) Setup Nginx proxy
+ 10.1) cd /etc/nginx/sites-available
+ 10.2) sudo castronaut --nginx .
+ 10.3) sudo ln -s /etc/nginx/sites-available/castronaut.conf /etc/nginx/sites-enabled/castronaut.conf
View
2  lib/version.rb
@@ -1,5 +1,5 @@
module Castronaut
module VERSION
- STRING = '0.5.3'
+ STRING = '0.5.4'
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.