# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
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
# useful for testing | |
# sudo docker run -it -p 8080:8080 <image name>:<tag> | |
FROM centos:centos7 | |
EXPOSE 8080 | |
RUN yum install -y python telnet | |
RUN echo '<html><head></head><body>hello</body></html>' >> /tmp/index.html |
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
# http://stackoverflow.com/questions/226703/how-do-i-prompt-for-input-in-a-linux-shell-script | |
echo "Configure which type of server?" | |
select yn in "App" "Database"; do | |
case $yn in | |
App ) TYPE="app"; break;; | |
Database ) TYPE="db"; break;; | |
esac | |
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
# public key needs to be added to deploy user | |
task :dev do | |
role :web, "localhost" | |
role :app, "localhost" | |
role :db , "localhost", :primary => true | |
set :rails_env, "qa" | |
ssh_options[:keys] = [File.join(ENV["HOME"], ".vagrant", "insecure_private_key")] | |
ssh_options[:port] = 2222 | |
ssh_options[:user] = "deploy" |
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
--- ../raygun-forked-ckbks/partnerpedia-nginx-160001d/templates/default/plugins/nginx.rb.erb 2012-09-28 13:21:00.000000000 -0400 | |
+++ cookbooks/partnerpedia-nginx-160001d/templates/default/plugins/nginx.rb.erb 2012-10-05 00:03:50.000000000 -0400 | |
@@ -46,12 +46,19 @@ | |
status, stdout, stderr = run_command(:no_status_check => true, :command => "<%= @nginx_bin %> -V") | |
+newcommon = "^nginx: " | |
+oldconfigargsig = "^configure arguments:(.+)" | |
+oldversionsig = "^nginx version: nginx\/(.+)" | |
+ |
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
# Setting up the colors and copy/paste | |
set -g default-terminal "screen-256color" | |
# This is OS/X specific and should only be enabled when the 'reattach-to-user-namespace' is installed | |
set -g default-command "reattach-to-user-namespace -l /bin/bash" | |
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy" | |
bind C-v run "tmux set-buffer $(reattach-to-user-namespace pbpaste); tmux paste-buffer" | |
# Make it use C-a, similar to screen.. | |
unbind C-b |
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
# Before running vagrant, export the shell variable for the organization on Hosted Chef and | |
# make sure the validator certificate is in ~/.chef. | |
# You can optionally export a shell variable for your Chef server username if it is different | |
# from your OS user export OPSCODE_USER=bofh | |
user = ENV['OPSCODE_USER'] || ENV['USER'] | |
Vagrant::Config.run do |config| | |
# All Vagrant configuration is done here. The most common configuration |
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
** [out :: 208.39.112.205:7000] Mobihand Application belongs to community 'AppZone' | |
** [out :: 208.39.112.205:7000] Finished import - total time: 00:15:36 | |
command finished | |
* executing `thinking_sphinx:start' | |
* executing "sudo -p 'sudo password: ' /usr/bin/monit start sphinx_appzone_3312" | |
servers: ["208.39.112.205", "208.39.112.205"] | |
*** [deploy:update_code] rolling back | |
* executing "rm -rf /data/appzone/releases/20111201005532; true" | |
servers: ["208.39.112.205"] | |
[208.39.112.205:7000] executing command |
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
#!/sbin/runscript | |
# Copyright 1999-2011 Gentoo Foundation | |
# Distributed under the terms of the GNU General Public License v2 | |
# $Header: $ | |
#depend() { | |
# | |
#} | |
start() { |
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
# Install 32 bit java and set path (if needed) | |
case node[:kernel][:machine] | |
when 'i686','i386','i586' | |
# do nothing | |
when 'x86_64' | |
ey_cloud_report "install" do | |
message "installing 32 bit compat libs" | |
end | |
package "app-emulation/emul-linux-x86-baselibs" do | |
action :install |
NewerOlder