-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9248a5d
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |