module RubyYacht::Plugins::Nginx
This module provides the plugin for managing nginx web servers.
Public Class Methods
load()
click to toggle source
This method loads the configuration for the nginx plugin.
# File lib/ruby_yacht/plugins/nginx.rb, line 5 def self.load RubyYacht.configure do server_type :nginx do container_type :web baseline_image 'nginx' end end RubyYacht.configure do add_hooks container_type: :web, web_server_type: :nginx, script_folder: File.join(File.dirname(__FILE__), 'nginx', 'scripts') do during(:install_libraries) { command 'apt-get install -y ruby' } during(:install_libraries) { copy_file 'index.html.erb' } during(:install_libraries) { copy_file 'index_config.erb' } during(:install_libraries) { copy_file 'app_config.erb' } during(:add_project_landing) { run_script :ruby, 'add_project.rb' } during(:add_app_config) { run_script :ruby, 'add_app.rb' } during(:cleanup) do command 'apt-get remove -y ruby' command 'apt-get autoremove -y' end end end end