Created
July 9, 2016 08:11
-
-
Save ipoddubny/21fee86a98c54112612a01ea90b4deb3 to your computer and use it in GitHub Desktop.
systemd docker container unit (Gogs)
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
# /etc/systemd/system/docker.gogs.service | |
[Unit] | |
Description=Gogs container | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Restart=always | |
ExecStart=/usr/bin/docker run --name=gogs -p 10022:22 -p 127.0.0.1:10080:3000 -v /var/gogs:/data gogs/gogs | |
ExecStop=/usr/bin/docker stop -t 2 gogs | |
ExecStopPost=/usr/bin/docker rm -f gogs | |
[Install] | |
WantedBy=local.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment