Skip to content

Commit 9248a5d

Browse files
committed
(init)
0 parents  commit 9248a5d

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# void-mongod
2+
This binary in releases was generated using [staticx](https://github.com/JonathonReinhart/staticx) on the official Docker container of mongodb.
3+
I've included a runit service to start it.
4+
5+
# Instructions
6+
First, download the latest `mongod` binary from the https://github.com/uditkarode/void-mongod/releases (or make one yourself) and move it to `/usr/local/bin/mongod` and run the following:
7+
8+
```bash
9+
# Assuming you've dealt with adding mongod to your system already
10+
chmod +x /usr/local/bin/mongod
11+
cd /tmp
12+
git clone --depth 1 https://github.com/uditkarode/void-mongod
13+
sudo mv mongod /etc/sv
14+
sudo ln -sv /etc/sv/docker /var/service
15+
sudo sv start mongod
16+
```
17+
18+
`mongod` will now run on system startup, and the logs will be saved to `/tmp/sv/log/mongod/current`.
19+

mongod/log/run

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
logdir=/tmp/sv/log/mongod
3+
mkdir -p "$logdir"
4+
exec svlogd -tt "$logdir"

mongod/run

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
mkdir -p /data/db
3+
/usr/local/bin/mongod 2>&1

0 commit comments

Comments
 (0)