Move wormhole from barnard to nodejs-2
Fixed two small bugs in the recipe: * hubot user wasn't created when necessary * systemd template always included redis service dependency
This commit is contained in:
@@ -32,6 +32,7 @@ build_essential app_name do
|
||||
end
|
||||
|
||||
include_recipe "kosmos-nodejs"
|
||||
include_recipe "kosmos-hubot::_user"
|
||||
|
||||
application app_path do
|
||||
data_bag = Chef::EncryptedDataBagItem.load('credentials', app_name)
|
||||
@@ -62,6 +63,7 @@ application app_path do
|
||||
action :nothing
|
||||
end
|
||||
|
||||
# TODO use chef systemd_service resource
|
||||
template "/lib/systemd/system/#{app_name}.service" do
|
||||
source 'nodejs.systemd.service.erb'
|
||||
owner 'root'
|
||||
@@ -70,6 +72,7 @@ application app_path do
|
||||
variables(
|
||||
user: app_user,
|
||||
group: app_group,
|
||||
without_redis: true,
|
||||
app_dir: app_path,
|
||||
entry: "#{app_path}/bin/hubot -a irc --name #{app_name}",
|
||||
environment: {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
[Unit]
|
||||
Description=Start nodejs app
|
||||
<% unless @without_redis %>
|
||||
Requires=redis-server.service
|
||||
After=redis-server.service
|
||||
<% end %>
|
||||
|
||||
[Service]
|
||||
ExecStart=<%= @entry %>
|
||||
|
||||
Reference in New Issue
Block a user