Skip to content

Instantly share code, notes, and snippets.

View aujkis's full-sized avatar
🎯
Focusing

Austris aujkis

🎯
Focusing
  • Riga, Latvia
View GitHub Profile
# /config/puma.rb
app = "manabalss" # App-specific
root = "/home/deployer/apps/#{app}"
workers 5
threads 1, 1 # relying on many workers for thread-unsafe apps
rackup DefaultRackup
port 11592
If you are on windows, start by setting up an Ubuntu in a VirtualBox
= http://www.psychocats.net/ubuntu/virtualbox
First you wanna update Ubuntu
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
$ sudo reboot
Add repositories
# in config/puma.rb
app = "cpp" # App-specific
root = "/home/deployer/apps/#{app}"
workers 5
threads 1, 1
#preload_app!
rackup DefaultRackup
#port 9292
@aujkis
aujkis / deploy.rb
Last active January 11, 2016 17:16 — forked from Epigene/deploy.rb
# Mina Deploy
# ===========
#
# Adapted from Creative deploy stack in Manabalss v4, Mar.2015
# On first deploy do: mina setup --verbose
# Then do : mina deploy --trace
#
# Usage:
# mina deploy --verbose # Standard deploy task | mina deploy[hard,seed] to hard-reset and seed
# mina rake[db:seed]
Initialize Digital Ocean Droplet, add SSH key(s)
ssh root@<IP>
# Fix locales
sudo nano /etc/environment
LANGUAGE=en_US.UTF-8
LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales
sudo reboot
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
config.error_notification_class = 'alert alert-danger'
config.button_class = 'waves-effect waves-light btn'
config.boolean_label_class = nil
config.wrappers :vertical_form, tag: 'div', class: 'input-field', error_class: 'has-error' do |b|
b.use :html5
b.use :placeholder
b.optional :maxlength
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm' # for rvm support. (http://rvm.io)
set :domain, 'esdb.cn'
set :identity_file, '/User/somebody/.ssh/somebody.pem'
set :deploy_to, '/home/ubuntu/apps/xxx.com'
set :repository, 'ssh://[email protected]/somebody/xxx.com.git'
set :branch, 'master'
========== RSpec Workflow ==========
1 # Add gem stack
group :development, :test do
# Test stack
gem "rspec-rails", '~> 3.2.0'
gem "spring-commands-rspec" #Spring for rspec ^
gem "factory_girl_rails"
gem "guard-rspec"
gem 'rb-fsevent', '~> 0.9.1'
gem "faker" #šis ģenerē dummy/fake datus pēc pieprasījuma
========== RSpec Workflow ==========
1 # Add gem stack
group :development, :test do
# Test stack
gem "rspec-rails", '~> 3.2.0'
gem "spring-commands-rspec" #Spring for rspec ^
gem "factory_girl_rails"
gem "guard-rspec"
gem 'rb-fsevent', '~> 0.9.1'
gem "faker" #šis ģenerē dummy/fake datus pēc pieprasījuma
@aujkis
aujkis / Locales.yaml
Last active August 29, 2015 14:13 — forked from wojtha/Locales.yaml
# config/locales/en.yml
en:
exception:
show:
not_found:
title: "Not Found"
description: "The page you were looking for does not exists."
internal_server_error:
title: "Internal Server Error"