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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| #config.vm.define "#{ENV['VAGRANT_DEFAULT_PROVIDER']}_boot2docker" | |
| config.vm.box = "yungsang/boot2docker" | |
| config.vm.network "private_network", ip: ENV['BOOT2DOCKER_IP'] || "10.211.55.5" |
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| VAGRANTFILE_API_VERSION = "2" | |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
| #config.vm.define "#{ENV['VAGRANT_DEFAULT_PROVIDER']}_boot2docker" | |
| config.vm.box = "yungsang/boot2docker" | |
| config.vm.network "private_network", ip: ENV['BOOT2DOCKER_IP'] || "10.211.55.5" |
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 rgts { | |
| server app:9292; | |
| } | |
| server { | |
| listen 80; | |
| server_name $nginx_rgts_host *.$nginx_rgts_host; | |
| root /app/public; | |
| try_files $uri/index.html $uri @rgts; |
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
| user nginx; | |
| worker_processes 1; | |
| error_log /var/log/nginx/error.log warn; | |
| pid /var/run/nginx.pid; | |
| env NGINX_RGTS_HOST; | |
| events { | |
| worker_connections 1024; | |
| } |
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
| node[:deploy].each do |application, deploy| | |
| if deploy[:application_type] != 'other' | |
| Chef::Log.debug("Skipping deploy::docker application #{application} as it is not deployed to this layer") | |
| next | |
| elsif deploy["environment_variables"]["APP_TYPE"] != 'docker' | |
| Chef::Log.debug("Skipping deploy::docker application #{application} as it is not of type 'docker'") | |
| next | |
| 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
| node[:deploy].each do |application, deploy| | |
| if deploy[:application_type] != 'other' | |
| Chef::Log.debug("Skipping deploy::docker application #{application} as it is not deployed to this layer") | |
| next | |
| elsif environment.delete(:APP_TYPE) != 'docker' | |
| Chef::Log.debug("Skipping deploy::docker application #{application} as it is not of type 'docker'") | |
| next | |
| 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
| node[:deploy].each do |application, deploy| | |
| # node[:deploy]['appshortname'][:environment_variables][:variable_name] | |
| environment = deploy[:environment_variables].dup | |
| if deploy[:application_type] != 'other' | |
| Chef::Log.debug("Skipping deploy::docker application #{application} as it is not deployed to this layer") | |
| next | |
| elsif environment.delete(:APP_TYPE) != 'docker' |
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
| node[:deploy].each do |application, deploy| | |
| # node[:deploy]['appshortname'][:environment_variables][:variable_name] | |
| environment = deploy[:environment_variables].dup | |
| if deploy[:application_type] != 'other' | |
| Chef::Log.debug("Skipping deploy::docker application #{application} as it is not deployed to this layer") | |
| next | |
| elsif environment.delete(:APP_TYPE) != 'docker' |
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
| node[:deploy].each do |application, deploy| | |
| # node[:deploy]['appshortname'][:environment_variables][:variable_name] | |
| environment = deploy[:environment_variables].dup | |
| if deploy[:application_type] != 'other' | |
| Chef::Log.debug("Skipping deploy::docker application #{application} as it is not deployed to this layer") | |
| next | |
| elsif environment.delete(:APP_TYPE) != 'docker' |
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
| 1 (M=56a43) [ruby-2.1.5] ~/src/opsworks-docker> docker inspect -f {{.State.Running}} d182180f3482 | |
| false | |
| (M=56a43) [ruby-2.1.5] ~/src/opsworks-docker> echo $? | |
| 0 | |
| (M=56a43) [ruby-2.1.5] ~/src/opsworks-docker> docker inspect -f {{.State.Running}} non_existing | |
| Error: No such image or container: non_existing | |
| 1 (M=56a43) [ruby-2.1.5] ~/src/opsworks-docker> echo $? | |
| 1 | |
| (M=56a43) [ruby-2.1.5] ~/src/opsworks-docker> |