• R/O
  • HTTP
  • SSH
  • HTTPS

grid-chef-repo: Commit

Grid環境構築用のChefリポジトリです。


Commit MetaInfo

Revisióndc380910284e7a055d73868a48da3d96ffa0e329 (tree)
Tiempo2022-01-04 17:11:16
Autorwhitestar <whitestar@user...>
Commiterwhitestar

Log Message

add backup cron configuration.

Cambiar Resumen

Diferencia incremental

--- a/cookbooks/bubbleupnp-server/CHANGELOG.md
+++ b/cookbooks/bubbleupnp-server/CHANGELOG.md
@@ -1,5 +1,9 @@
11 # bubbleupnp-server CHANGELOG
22
3+0.2.3
4+-----
5+- add backup cron configuration.
6+
37 0.2.2
48 -----
59 - fix the restore script.
--- a/cookbooks/bubbleupnp-server/README.md
+++ b/cookbooks/bubbleupnp-server/README.md
@@ -86,7 +86,7 @@ override_attributes(
8686 'config' => {
8787 'services' => {
8888 'bubbleupnp-server' => {
89- 'restart' => 'no',
89+ 'restart' => 'unless-stopped',
9090 },
9191 },
9292 },
--- a/cookbooks/bubbleupnp-server/attributes/default.rb
+++ b/cookbooks/bubbleupnp-server/attributes/default.rb
@@ -65,7 +65,7 @@ version_2_config = {
6565 'services' => {
6666 'bubbleupnp-server' => {
6767 'image' => '${REGISTRY}/${NAME}:${VER}',
68- 'restart' => 'always',
68+ 'restart' => 'unless-stopped',
6969 'network_mode' => 'host',
7070 'volumes' => [
7171 # These volumes will be set by the bubbleupnp-server::docker-compose recipe automatically.
--- a/cookbooks/bubbleupnp-server/recipes/docker-compose.rb
+++ b/cookbooks/bubbleupnp-server/recipes/docker-compose.rb
@@ -26,8 +26,12 @@ app_dir = node['bubbleupnp-server']['docker-compose']['app_dir']
2626 data_dir = node['bubbleupnp-server']['docker-compose']['data_dir']
2727 dot_env = node['bubbleupnp-server']['docker-compose']['dot_env']
2828
29+file_owner = 'root'
30+file_group = 'root'
2931 workdir = '/usr/share/bubbleupnpserver'
3032 if dot_env['VER'] > '0.9-5' || dot_env['VER'] == 'latest'
33+ file_owner = 'bubbleupnpserver'
34+ file_group = 'users'
3135 workdir = '/opt/bubbleupnpserver'
3236 end
3337
@@ -92,6 +96,8 @@ end
9296 group 'root'
9397 mode '0755'
9498 variables(
99+ file_owner: file_owner,
100+ file_group: file_group,
95101 workdir: workdir
96102 )
97103 end
--- a/cookbooks/bubbleupnp-server/templates/default/etc/cron.d/bubbleupnp-server-local
+++ b/cookbooks/bubbleupnp-server/templates/default/etc/cron.d/bubbleupnp-server-local
@@ -14,3 +14,4 @@ APP_HOME=<%= node['bubbleupnp-server']['docker-compose']['app_dir'] %>
1414 OPTS='<%= opts %>'
1515
1616 @reboot root sleep <%= wait_time %> && date "$DATE_F" > $LOG && cd $APP_HOME && docker-compose $OPTS stop >> $LOG 2>&1 && docker-compose $OPTS up -d >> $LOG 2>&1 && docker-compose ps >> $LOG 2>&1
17+30 * * * * root date "$DATE_F" >> $LOG && cd $APP_HOME && ./backup.sh >> $LOG 2>&1
--- a/cookbooks/bubbleupnp-server/templates/default/opt/docker-compose/app/bubbleupnp-server/restore.sh
+++ b/cookbooks/bubbleupnp-server/templates/default/opt/docker-compose/app/bubbleupnp-server/restore.sh
@@ -9,4 +9,4 @@ sudo docker cp ./${backup_dir}/cache ${container_id}:<%= @workdir %>/
99 sudo docker cp ./${backup_dir}/Playlists ${container_id}:<%= @workdir %>/
1010
1111 # fix file owner
12-sudo docker exec -u root ${container_id} chown -R bubbleupnpserver:users <%= @workdir %>/{configuration.xml,cache,Playlists}
12+sudo docker exec -u root ${container_id} chown -R <%= @file_owner %>:<%= @file_group %> <%= @workdir %>/{configuration.xml,cache,Playlists}
--- a/cookbooks/bubbleupnp-server/version
+++ b/cookbooks/bubbleupnp-server/version
@@ -1 +1 @@
1-0.2.2
1+0.2.3
Show on old repository browser