37 lines
771 B
Ruby
37 lines
771 B
Ruby
#
|
|
# Cookbook Name:: 5apps-xmpp_server
|
|
# Recipe:: default
|
|
#
|
|
# Copyright 2016, 5apps
|
|
#
|
|
# All rights reserved - Do Not Redistribute
|
|
#
|
|
|
|
unless node.chef_environment == "development"
|
|
include_recipe "firewall"
|
|
firewall_rule "xmpp" do
|
|
port [5222, 5269]
|
|
protocol :tcp
|
|
command :allow
|
|
end
|
|
end
|
|
|
|
apt_repository "prosody" do
|
|
uri "https://packages.prosody.im/debian"
|
|
distribution node["lsb"]["codename"]
|
|
components ["main"]
|
|
key "https://prosody.im/files/prosody-debian-packages.key"
|
|
end
|
|
|
|
package "prosody"
|
|
|
|
service "prosody" do
|
|
action [:enable]
|
|
end
|
|
|
|
include_recipe "5apps-xmpp_server::letsencrypt"
|
|
|
|
# backup the data dir and the config files
|
|
node.override["backup"]["archives"]["prosody"] = ["/var/lib/prosody", "/etc/prosody"]
|
|
include_recipe "backup"
|