Skip to content

Commit 7676087

Browse files
CLDSRV-835: Add mongodb logs to CI artifacts
1 parent 1ff2d99 commit 7676087

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

.github/docker/docker-compose.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ services:
9393
network_mode: "host"
9494
profiles: ['mongo', 'ceph']
9595
image: ${MONGODB_IMAGE}
96+
volumes:
97+
- /tmp/artifacts/${JOB_NAME}:/logs
9698
ceph:
9799
network_mode: "host"
98100
profiles: ['ceph']

.github/docker/mongodb/conf/mongo-run.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,8 @@ init_RS() {
77
}
88
init_RS &
99

10+
# Pre-create log file as world-readable; mongod (logAppend: true) opens it without resetting permissions
11+
# Otherwise mongod create the file with 600 permissions, preventing CI artifact upload
12+
touch /logs/mongod.log && chmod 644 /logs/mongod.log
13+
1014
mongod --bind_ip_all --config=/conf/mongod.conf

.github/docker/mongodb/conf/mongod.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
systemLog:
2+
destination: file
3+
path: "/logs/mongod.log"
4+
logAppend: true
15
storage:
26
journal:
37
enabled: true

0 commit comments

Comments
 (0)