Last active
December 21, 2022 05:50
-
-
Save anvie/e3fd2cb1bd65d1d4bd6cb59a4c1abbd9 to your computer and use it in GitHub Desktop.
Systemd untuk mongodb
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
[Unit] | |
Description=Mongodb Service Container | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
Type=simple | |
Restart=always | |
RestartSec=5 | |
StartLimitBurst=5 | |
LimitNOFILE=10000 | |
User=mongodb | |
ExecStartPre=-/usr/bin/docker stop mongodb | |
ExecStartPre=-/usr/bin/docker rm mongodb | |
ExecStart=/usr/bin/docker run --rm --user 1001 -v '/var/data/mongodb:/bitnami/mongodb' -p '27017:27017' --name mongodb bitnami/mongodb:latest | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment