Skip to content

Commit

Permalink
(init)
Browse files Browse the repository at this point in the history
  • Loading branch information
uditkarode committed Nov 13, 2021
0 parents commit 9248a5d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# void-mongod
This binary in releases was generated using [staticx](https://github.com/JonathonReinhart/staticx) on the official Docker container of mongodb.
I've included a runit service to start it.

# Instructions
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:

```bash
# Assuming you've dealt with adding mongod to your system already
chmod +x /usr/local/bin/mongod
cd /tmp
git clone --depth 1 https://github.com/uditkarode/void-mongod
sudo mv mongod /etc/sv
sudo ln -sv /etc/sv/docker /var/service
sudo sv start mongod
```

`mongod` will now run on system startup, and the logs will be saved to `/tmp/sv/log/mongod/current`.

4 changes: 4 additions & 0 deletions mongod/log/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
logdir=/tmp/sv/log/mongod
mkdir -p "$logdir"
exec svlogd -tt "$logdir"
3 changes: 3 additions & 0 deletions mongod/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
mkdir -p /data/db
/usr/local/bin/mongod 2>&1

0 comments on commit 9248a5d

Please sign in to comment.