Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix systemd setup with single binary docs #696

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions modules/ROOT/pages/deployment/binary/binary-setup.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -217,33 +217,42 @@ sudo useradd --system --no-create-home --shell=/sbin/nologin ocis
----

* We strongly advise *against* using the user `root` for this purpose.
* Placing the environment file in `{ocis_env}` is only a suggestion, but a good one.
** The directory `ocis_env` must exist and the user `ocis` must be able to read it.
* Since the `ocis` user doesn't have a home directory, the directories `{ocis_env}` and `{ocis_data}` must exist and the user `ocis` must be able to read it.
+
--
[source,bash,subs="attributes+"]
----
sudo mkdir -p {ocis_env}
sudo mkdir -p {ocis_env} {ocis_data}
----

[source,bash,subs="attributes+"]
----
sudo chown -R ocis:ocis {ocis_env}
sudo chown -R ocis:ocis {ocis_env} {ocis_data}
----
--

Create the file `{ocis_env}/ocis.env` with the definitions of environment variables. See the following sections for information on additional environment variables: xref:deployment/general/general-info.adoc#configurations-to-access-the-webui[Configurations to Access the Web UI] and xref:deployment/general/general-info.adoc#base-data-directory[Base Data Directory].

* Placing the environment file in `{ocis_env}` is only a suggestion, but a good one.
** Create the file `{ocis_env}/ocis.env` with the definitions of environment variables. See the following sections for information on additional environment variables: xref:deployment/general/general-info.adoc#configurations-to-access-the-webui[Configurations to Access the Web UI] and xref:deployment/general/general-info.adoc#base-data-directory[Base Data Directory].
+
--
NOTE: This is just an example with a minimal set of environment variables used.

[source,plaintext,subs="attributes+"]
----
OCIS_INSECURE=true
OCIS_URL=https://localhost:{ocis_port}
PROXY_HTTP_ADDR=0.0.0.0:{ocis_port}

OCIS_CONFIG_DIR={ocis_env}
OCIS_BASE_DATA_PATH={ocis_data}
OCIS_LOG_LEVEL=error
----
--

Use the following command to initialize the ocis config:

[source,bash,subs="attributes+"]
----
OCIS_CONFIG_DIR={ocis_env} sudo -u ocis ocis init --insecure true
----

=== Setup systemd Service

Expand Down