Permalink
Browse files

adding support for castronaut binary to write sample vhost configurat…

…ion file
  • Loading branch information...
1 parent e65e4fe commit ede7613ed27f38670ad0ea0f8ee86e2abb643363 Aaron Bedra committed Jan 3, 2009
Showing with 18 additions and 16 deletions.
  1. +1 −1 Rakefile
  2. +7 −3 bin/castronaut
  3. +1 −1 castronaut.gemspec
  4. +2 −9 config/nginx_vhost.conf
  5. +6 −1 doc/deployment/ubuntu-with-nginx.textile
  6. +1 −1 lib/version.rb
View
@@ -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
@@ -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
@@ -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
@@ -1,24 +1,17 @@
-# 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;
proxy_redirect off;
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;
}
@@ -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
@@ -1,5 +1,5 @@
module Castronaut
module VERSION
- STRING = '0.5.3'
+ STRING = '0.5.4'
end
end

0 comments on commit ede7613

Please sign in to comment.