Skip to content

Instantly share code, notes, and snippets.

@munisystem
Last active December 7, 2015 06:56
Show Gist options
  • Save munisystem/8d74fb20a979dd49d551 to your computer and use it in GitHub Desktop.
Save munisystem/8d74fb20a979dd49d551 to your computer and use it in GitHub Desktop.
itamae ghost settings for anti archlinux user
# itamae-archlinux/cookbook/docker/default.rb
package 'docker-io' do
notifies :start, 'service[docker]', :immediately
end
service 'docker' do
action :enable
end
# itamae-archlinux/cookbook/docker-ghost/default.rb
include_recipe './attributes/default.rb'
execute 'Install docker-ghost' do
command <<-EOL
docker run --name=ghost -d \
--publish=2368:2368 \
--volume=/srv/docker/ghost:/var/lib/ghost \
ghost
EOL
user 'root'
not_if 'docker ps -a | grep ghost'
end
#template '/usr/lib/systemd/system/docker-ghost.service' do
# source './templates/docker-ghost.service'
# owner 'root'
# group 'root'
# mode '0644'
# notifies :run, 'execute[Reload_daemon]', :immediately
# notifies :restart, 'service[docker-ghost]', :immediately
#end
#template '/srv/docker/ghost/config.js' do
# source './templates/config.js.erb'
# owner 'root'
# group 'root'
# mode '0644'
# notifies :restart, 'service[docker-ghost]', :immediately
#end
#execute 'Reload_daemon' do
# command 'systemctl daemon-reload'
# user 'root'
# action :nothing
#end
#service 'docker-ghost' do
# action :enable
#end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment