Skip to content

Commit

Permalink
docs: systemd
Browse files Browse the repository at this point in the history
  • Loading branch information
dhuser committed Apr 25, 2018
1 parent 2a01723 commit 162717b
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions docs/installation.rst
Expand Up @@ -6,8 +6,8 @@ It is *highly recommended* to install this on a development/test server before r
Use `pipenv <https://docs.pipenv.org>`_ (the recommended wrapper for virtualenvs and pip) to install this package.
It depends on Python 3.5+ and various packages as described in ``Pipfile``.

- Briefcase version: 1.9.0 Production
- smartva: SmartVA-Analyze, version 2.0.0-a6
- Briefcase version: 1.9.0 Production (see `here <https://opendatakit.org/downloads/download-info/odk-briefcase>`_)
- smartva: SmartVA-Analyze, version 2.0.0-a8

.. code:: bash
Expand All @@ -17,13 +17,13 @@ Then, to run the application, invoke:

.. code:: bash
pipenv run python -m smartvadhis2
pipenv run smartvadhis2
Optional arguments (can't use both at the same time)
Optional but exclusive arguments:

::

--briefcase Skip download of ODK aggregate file, provide local file path instead
--manual Skip download of ODK aggregate file, provide local file path instead
--all Pull ALL briefcases instead of relative time window


Expand All @@ -36,8 +36,27 @@ If you do not provide any argument, it will attempt to import ODK aggregate reco

e.g. if today is 2018-04-08 it will pass 2018-04-01 -> 2018-04-02 as arguments to ODK Briefcase.

**Deployment & scheduling**
TODO
Deployment
^^^^^^^^^^^

Make sure the script is running even after server reboots. This depends on the Operating System.

For systemd-based Operating Systems, you can install this service:

::

[Unit]
Description=smartva-dhis2
After=multi-user.target

[Service]
Type=simple
Restart=always
WorkingDirectory=/path/to/repo
ExecStart=/usr/local/bin/pipenv run smartvadhis2

[Install]
WantedBy=multi-user.target


To run tests:
Expand Down

0 comments on commit 162717b

Please sign in to comment.