Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:newbamboo/panda
Browse files Browse the repository at this point in the history
  • Loading branch information
Martyn Loughran committed Sep 24, 2008
2 parents 797ba54 + eb3612f commit 99497ac
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Expand Up @@ -8,8 +8,7 @@ panda_init.rb
videos/*
panda_*.god
panda_nginx.conf
log/*
videos/*
config/mailer.rb
config/panda_init_*.rb
panda_all_staging_nginx.conf
panda_all_staging_nginx.conf
14 changes: 7 additions & 7 deletions README_EC2
Expand Up @@ -14,17 +14,17 @@ Bin is /usr/local/nginx/sbin/nginx
Grab Panda
----------

cd /usr/local/www
cd /var/local/www
git clone git://github.com/newbamboo/panda.git
mkdir /usr/local/www/panda/videos # Place for temp videos
mkdir /usr/local/www/panda/log
mkdir /var/local/www/panda/videos # Place for temp videos
mkdir /var/local/www/panda/log

Configure Panda
---------------

Copy the example config file and enter your AWS keys and other details.

cd /usr/local/www/panda/config
cd /var/local/www/panda/config
cp panda_init.rb.example panda_init.rb
vi panda_init.rb

Expand Down Expand Up @@ -87,18 +87,18 @@ Start Panda

You can start Merb directly:

cd /usr/local/www/panda
cd /var/local/www/panda
merb -p 4001

The encoder can be run with

cd /usr/local/www/panda
cd /var/local/www/panda
merb -r lib/encoder.rb -p 5001 -e encoder

Using God with the supplied config is the best method to control Merb and the encoder:

god
god load /usr/local/www/panda/panda.god
god load /var/local/www/panda/panda.god

Upload some videos!
-------------------
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/videos.rb
Expand Up @@ -156,7 +156,7 @@ def render_error(msg)
"<textarea>" + {:error => msg}.to_json + "</textarea>"
else
@exception = msg
render(:template => "/exceptions/video_exception", :layout => false) # TODO: Why is :action setting 404 instead of 500?!?!
render(:template => "exceptions/video_exception", :layout => false) # TODO: Why is :action setting 404 instead of 500?!?!
end
when :xml
{:error => msg}.to_simple_xml
Expand Down
2 changes: 1 addition & 1 deletion config/panda_init.rb.example
Expand Up @@ -6,7 +6,7 @@ Panda::Config.use do |p|
p[:upload_redirect_url] = "http://localhost:4000/videos/$id/done"
p[:state_update_url] = "http://localhost:4000/videos/$id/status_update"
p[:videos_domain] = "" #eg: "s3.amazonaws.com/myvideosbucket", or fqdn like "videos.pandastream.com" if you've setup the CNAE record.
p[:tmp_video_dir] = Merb.root / "videos"
p[:tmp_video_dir] = "/var/tmp/videos"

p[:access_key_id] = "" # Your AWS Access Key
p[:secret_access_key] = "" # Your AWS Secret Access Key
Expand Down
1 change: 1 addition & 0 deletions log/.gitignore
@@ -0,0 +1 @@
*
4 changes: 2 additions & 2 deletions panda.god
@@ -1,6 +1,6 @@
God.watch do |w|
w.name = "panda"
current_path = "/usr/local/www/panda"
current_path = "/var/local/www/panda"
port = 4001
w.start = "/bin/bash -c 'cd #{current_path}; merb -d -p #{port} -e production'"
w.stop = "/bin/bash -c 'cd #{current_path}; merb -k #{port}'"
Expand Down Expand Up @@ -33,7 +33,7 @@ end

God.watch do |w|
w.name = "encoder"
current_path = "/usr/local/www/panda"
current_path = "/var/local/www/panda"
port = 4091
w.start = "/bin/bash -c 'cd #{current_path}; merb -r lib/encoder.rb -d -p #{port} -e encoder'"
w.stop = "/bin/bash -c 'cd #{current_path}; merb -k #{port}'"
Expand Down
2 changes: 1 addition & 1 deletion panda_nginx.conf.example
Expand Up @@ -11,7 +11,7 @@ http {
server {
listen 80;
server_name myapp.com;
root /usr/local/www/panda;
root /var/local/www/panda;

location / {
proxy_pass http://127.0.0.1:4001;
Expand Down

0 comments on commit 99497ac

Please sign in to comment.