Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
167 additions
and
64 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,8 @@ | ||
<html> | ||
<head> | ||
<meta http-equiv="Refresh" content="0; url=basics.html" /> | ||
</head> | ||
<body> | ||
<p>Please follow <a href="basics.html">this link</a>.</p> | ||
</body> | ||
</html> |
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
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
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
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 |
---|---|---|
@@ -1,23 +1,35 @@ | ||
# Example of Application Deployment using [Virtual File System][vfs]. | ||
# | ||
# In this example we uploading sample app files to remote server, | ||
# write database configuration file and restart the server on remote machine. | ||
|
||
# Adding examples folder to load paths. | ||
$LOAD_PATH << File.expand_path("#{__FILE__}/../../..") | ||
|
||
# Connecting to SFTP and preparing sandbox. You may take a look at | ||
# the [docs/ssh/sandbox.rb][ssh_sandbox] to see the actual code. | ||
require 'docs/ssh/sandbox' | ||
sandbox = $sandbox | ||
|
||
# Preparing sample files. | ||
# Preparing sample files located in our local folder in | ||
# current directory. | ||
current_dir = __FILE__.to_entry.parent | ||
sample_app = current_dir['deployment/app'] | ||
|
||
# Copying app to remote machine. | ||
# Copying application files to remote machine. | ||
app = sandbox['apps/app'] | ||
sample_app.copy_to app | ||
p app['app.rb'].exist? # => true | ||
|
||
# Configuring. | ||
# Writing database configuration file. | ||
config = app['config.yml'] | ||
config.write "database: mysql" | ||
config.append "name: app_production" | ||
p app['config.yml'].exist? # => true | ||
|
||
# Running | ||
# Updating gems and restarting the server. | ||
p app.bash("echo 'bundle install'") # => bundle install | ||
p app.bash("echo 'server start'") # => server start | ||
p app.bash("echo 'server start'") # => server start | ||
|
||
# [vfs]: .. | ||
# [ssh_sandbox]: sandbox.html |
Oops, something went wrong.