This file contains hidden or 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
upstream myapp_puma { | |
server unix:/tmp/myapp_puma.sock fail_timeout=0; | |
} | |
# for redirecting to https version of the site | |
server { | |
listen 80; | |
rewrite ^(.*) https://$host$1 permanent; | |
} | |
This file contains hidden or 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
sudo chown www-data:www-data * -R | |
sudo usermod -a -G www-data username | |
sudo chmod -R g+rw * |
This file contains hidden or 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
every :reboot do | |
command "/etc/init.d/unicorn_app start" | |
end |
This file contains hidden or 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
### change APP_NAME and REPO ### | |
### Also replace example.com with your domain, it requires DNS setup, atleast a local entry in ssh-config or hosts file | |
require 'rake/remote_task' | |
set :domain, 'example.com' | |
set :app_name, 'APP_NAME' | |
set :repo, 'ssh://REPO' | |
namespace :deploy do | |
desc "Server setup" |
This file contains hidden or 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
server { | |
listen 80; | |
server_name www.example.com; | |
rewrite ^(.*) http://example.com$1 permanent; | |
} | |
server { | |
listen 80; | |
server_name example.com; |
This file contains hidden or 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
<div class="container"> | |
<div class="row"> | |
<div class="eight columns">Main</div> | |
<div class="four columns">Sidebar</div> | |
</div> | |
</div> |
This file contains hidden or 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
<form id="loginForm" action="/whatever" method="post"> | |
<div class="row"> | |
<div class="seven columns"> | |
<label for="email">Email Address</label> | |
<input type="text" name="email" id="emailField" placeholder="[email protected]" required/> | |
<label for="password">Password</label> | |
<input type="password" name="password" id="passwordField" required/> | |
<button type="submit" class="button-primary">Sign In</button> |
This file contains hidden or 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
## Basic VPS Setup for deploying static sites | |
## Server OS : Ubuntu 14.04 LTS 64 bit | |
## Author: Ramesh Jha (ramesh[at]rameshjha.com),(http://blog.sudobits.com) | |
## License: MIT | |
#### SSH into the server `ssh root@IP_ADDRESS` | |
### 1. Update system packages | |
apt-get -y update | |
apt-get -y upgrade |
This file contains hidden or 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
#!/bin/sh | |
echo 'Deploying to the server............' | |
GIT_WORK_TREE=/home/example_user/example.com git checkout -f | |
echo '..............................Done.' |
This file contains hidden or 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
server { | |
listen 80; | |
server_name www.example.com; | |
rewrite ^(.*) http://example.com$1 permanent; | |
} | |
server { | |
listen 80; | |
server_name example.com; | |