This repository has been archived by the owner on Mar 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added local deployment configurations to get up and running in one co…
…mmand Signed-off-by: Ka Hin Ng <[email protected]>
- Loading branch information
Vladimir Kasatkin
authored and
Ka Hin Ng
committed
Apr 17, 2018
1 parent
d24ed53
commit 43fb41b
Showing
3 changed files
with
39 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace :local do | ||
desc "Create configuration files from examples" | ||
task :copyDbConfig do | ||
puts 'Creating config/database.yml' | ||
system("cp config/database.yml.example config/database.yml") and puts "... done" | ||
end | ||
|
||
desc "Setup db" | ||
task :setupDb => [:copyDbConfig, 'db:create','db:migrate'] | ||
|
||
desc "Start rails app" | ||
task :startRails do | ||
puts 'Starting rails app' | ||
system("rails server -b 0.0.0.0 --port 3000") | ||
end | ||
|
||
desc "Run spec tests" | ||
task :test => [:setupDb, :spec] | ||
|
||
desc "Start application" | ||
task :start => [:setupDb, :startRails] | ||
end |