Skip to content

Commit a909b1a

Browse files
committed
cd: add logrotate config
Part of #777
1 parent 8b7fc38 commit a909b1a

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

goreleaser/.goreleaser_linux.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ nfpms:
7070
- src: "package/tt.yaml.default"
7171
dst: "/etc/tarantool/tt.yaml"
7272
type: config
73+
74+
- src: "package/logrotate.conf"
75+
dst: "/etc/logrotate.d/tt.conf"
76+
type: config
77+
file_info:
78+
mode: 0600
79+
7380
# ZSH and Bash autocompletion scripts get placed in appropriate directories
7481
# and get activated automatically with restarting corresponding shell after
7582
# the package installation.

package/logrotate.conf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# /var/log/tarantool/<env>/<app>/<instance>/*.log
2+
/var/log/tarantool/*/*/*/*.log {
3+
daily
4+
size 512k
5+
missingok
6+
rotate 10
7+
compress
8+
delaycompress
9+
sharedscripts # Run tt logrotate only once after all logs are rotated.
10+
postrotate
11+
/usr/bin/tt -S logrotate
12+
endscript
13+
}

0 commit comments

Comments
 (0)