Merge branch '19472-logrotate' into 2.4-release
[arvados.git] / tools / salt-install / config_examples / single_host / multiple_hostnames / pillars / logrotate_wb1.sls
diff --git a/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/logrotate_wb1.sls b/tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/logrotate_wb1.sls
new file mode 100644 (file)
index 0000000..3cbfd42
--- /dev/null
@@ -0,0 +1,24 @@
+---
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+# Refer to logrotate-formula's documentation for information about customization
+# https://github.com/salt-formulas/salt-formula-logrotate/blob/master/README.rst
+
+logrotate:
+  jobs:
+    arvados-workbench:
+      path:
+        - /var/www/arvados-workbench/shared/log/*.log
+      config:
+        - daily
+        - missingok
+        - rotate 365
+        - compress
+        - nodelaycompress
+        - copytruncate
+        - sharedscripts
+        - postrotate
+        - '  [ -s /run/nginx.pid ] && kill -USR1 `cat /run/nginx.pid`'
+        - endscript