mirror of
https://github.com/jimeh/skyhook.git
synced 2026-02-19 11:06:38 +00:00
initial import
This commit is contained in:
6
init/projects/sinatra_demo.conf
Normal file
6
init/projects/sinatra_demo.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name skyhookdemo.jimeh.me;
|
||||
passenger_enabled on;
|
||||
root /var/www/projects/sinatra_demo/htdocs/public;
|
||||
}
|
||||
19
init/projects/sinatra_demo.rb
Normal file
19
init/projects/sinatra_demo.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
class SinatraDemoProject < Project
|
||||
|
||||
def initialize
|
||||
@name = "sinatra_demo" # Project name
|
||||
@path = "#{$projects_path}/#{@name}" # Local checkout path
|
||||
@revision = nil # Default revision to checkout
|
||||
@repo = "https://heartbit.springloops.com/source/skyhookdemo/projects/sinatra_demo"
|
||||
super
|
||||
end
|
||||
|
||||
def start
|
||||
file = "#{@path}/htdocs/config.ru"
|
||||
configru = File.read(file)
|
||||
File.open(file, "w+") do |f|
|
||||
f.write(configru.gsub("development", "production"))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
9
init/projects/skyhook_demo.conf
Normal file
9
init/projects/skyhook_demo.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 80 default;
|
||||
server_name _;
|
||||
passenger_enabled on;
|
||||
passenger_use_global_queue on;
|
||||
rack_env production;
|
||||
index index.html index.htm;
|
||||
root /var/www/projects/skyhook_demo/htdocs/public;
|
||||
}
|
||||
24
init/projects/skyhook_demo.rb
Normal file
24
init/projects/skyhook_demo.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
class SkyhookDemoProject < Project
|
||||
|
||||
def initialize
|
||||
@name = "skyhook_demo" # Project name
|
||||
@path = "#{$projects_path}/#{@name}" # Local checkout path
|
||||
@revision = nil # Default revision to checkout
|
||||
@repo = "https://heartbit.springloops.com/source/skyhookdemo/projects/skyhook_demo"
|
||||
super
|
||||
end
|
||||
|
||||
def start
|
||||
# shell "export RAILS_ENV=production; #{@path}/htdocs/script/delayed_job start"
|
||||
end
|
||||
|
||||
def stop
|
||||
# shell "export RAILS_ENV=production; #{@path}/htdocs/script/delayed_job stop"
|
||||
end
|
||||
|
||||
def restart
|
||||
# stop
|
||||
# start
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user