Last active
May 6, 2024 11:37
-
-
Save florianb/d86e1ab4f5ca7a1f828a3bb3913d15de to your computer and use it in GitHub Desktop.
Livebook.dev Systemd Service
This file contains hidden or 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=Livebook Server | |
| After=docker.service | |
| Requires=docker.service | |
| [Service] | |
| User=livebook | |
| Group=livebook | |
| Restart=always | |
| ExecStartPre=-/usr/bin/docker stop livebook | |
| ExecStartPre=-/usr/bin/docker rm livebook | |
| ExecStartPre=/usr/bin/docker pull ghcr.io/livebook-dev/livebook | |
| ExecStart=/usr/bin/docker run --name livebook -u 1001:1001 -e "LIVEBOOK_PASSWORD=" -p 8080:8080 -p 8081:8081 -v /home/livebook:/data ghcr.io/livebook-dev/livebook | |
| ExecStop=/usr/bin/docker stop livebook | |
| [Install] | |
| WantedBy=multi-user.target |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This Unit file requires the user "livebook" (UID/GID: 1001) being able to run docker which might be a security issue: https://docs.docker.com/engine/install/linux-postinstall/