From edc87187b38adf253e571932f5d1f01ad8d10892 Mon Sep 17 00:00:00 2001 From: pmumby Date: Tue, 18 Apr 2017 10:43:19 -0400 Subject: [PATCH] Updated readme to include instructions for systemd service --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index 7c0467d7..49f597bf 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,46 @@ If you want to run WebODM in production, make sure to change the `SECRET_KEY` va See the [API documentation page](https://opendronemap.github.io/WebODM/). +## Run the docker version as a Linux Service + +If you wish to run the docker version with auto start/monitoring/stop, etc, as a systemd style Linux Service, a systemd unit file is included in the service folder of the repo. + +The following pre-requisites are required: + * Requires odm user + * Requires docker installed via system (ubuntu: apt-get install docker.io) + * Requires screen to be installed + * Requires odm user member of docker group + * Required WebODM directory checked out to /opt/WebODM + * Requires that /opt/WebODM is recursively owned by odm:odm + +If all pre-requisites have been met, and repository is checked out to /opt/WebODM folder, then you can use the following steps to enable and manage the service: + +First, to install the service, and enable the service to run at startup from now on: +```bash +systemctl enable /opt/WebODM/service/webodm.service +``` + +To manually stop the service: +```bash +systemctl stop webodm +``` + +To manually start the service: +```bash +systemctl start webodm +``` + +To manually check service status: +```bash +systemctl status webodm +``` + +The service runs within a screen session, so as the odm user you can easily jump into the screen session by using: +```bash +screen -r webodm +``` +(if you wish to exit the screen session, don't use ctrl+c, that will kill webodm, use `CTRL+A` then hit the `D` key) + ## Run it natively If you want to run WebODM natively, you will need to install: