Skip to content

Instantly share code, notes, and snippets.

View jaigouk's full-sized avatar

Jaigouk Kim jaigouk

View GitHub Profile
.fc {
direction: ltr;
text-align: left; }
.fc table {
border-collapse: collapse;
border-spacing: 0; }
.fc .btn {
line-height: 1.2em; }
html .fc {
# --------------------------------------------------
# Setting up a Laravel app on dokku in a Vagrant box
# --------------------------------------------------
# First: cloning the dokku repo
$ git clone https://github.com/progrium/dokku
$ cd dokku
# Start, configure & provision a new vagrant box using the Vagrantfile from the repo
$ vagrant up

Deploy your own PaaS!

Setting up Dokku with DigitalOcean and Namecheap

..or how I made my own heroku in a few hours for $3.98.

This write-up owes a great deal to dscape's Node.js Deployments with Docker, Dokku, & Digital Ocean, the dokku project itself, and the fine folks working on dokku's issues. I took dscape's article as a starting point when trying this out but found some details lacking so I documented my own process for getting dokku up and running.

1. Get a domain

#Nginx Load Balancer Service For Core OS

Create a directory to manage using fleetctl for this service:

$ mkdir static

Create this file in static/nginx_lb.service

@jaigouk
jaigouk / nginx.conf
Last active August 29, 2015 14:13 — forked from dnprock/nginx.conf
# Sticky session module for nginx
# https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng/
# nginx configure command: ./configure --with-http_ssl_module --add-module=../nginx-sticky-module-ng/ --sbin-path=/usr/local/sbin --with-http_gzip_static_module
upstream vida_node_server {
sticky path=/;
server 127.0.0.1:3000 max_fails=3 fail_timeout=30s;
server [server2]:3000 max_fails=3 fail_timeout=30s;
}
upstream haproxy {
server 127.0.0.1:9000;
}
upstream stats {
server 127.0.0.1:9999;
}
server {
listen 80; ## listen for ipv4; this line is default and implied
[Unit]
Description=App Redis Sidekick
Requires=docker.service
Requires=etcd.service
After=docker.service
After=etcd.service
After=app-redis.service
BindsTo=app-redis.service
module BuilderStepHelpers
def create_model(model_name, attributes={})
send("create_#{model_name.gsub(' ','_')}",attributes)
end
end
World do |world|
world.extend BuilderStepHelpers
end
@jaigouk
jaigouk / gist:66849
Created February 19, 2009 10:34 — forked from lukemelia/gist:42973
#features/steps/users_steps.rb:
Given "I'm a logged in member" do
@me = create_adult
logged_in_as @me
end
#features/support/env.rb:
class Cucumber::Rails::World

Why build a site? Why do your customers care?

The core purpose of a website is to help your customers answer the questions necessary to do business with you.

If your website is a series of answers to questions then the success of your site depends on what questions you answer--it's the questions and answers that show the customer you provide a service they're looking for, you're a good choice and that they should buy from you.

In general every customer has the following questions:

  1. Who are you?
  2. What do you offer?