forked from valkey-io/valkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystemd-valkey_server.service
43 lines (40 loc) · 1.54 KB
/
systemd-valkey_server.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# example systemd service unit file for valkey-server
#
# In order to use this as a template for providing a valkey service in your
# environment, _at the very least_ make sure to adapt the valkey configuration
# file you intend to use as needed (make sure to set "supervised systemd"), and
# to set sane TimeoutStartSec and TimeoutStopSec property values in the unit's
# "[Service]" section to fit your needs.
#
# Some properties, such as User= and Group=, are highly desirable for virtually
# all deployments of valkey, but cannot be provided in a manner that fits all
# expectable environments. Some of these properties have been commented out in
# this example service unit file, but you are highly encouraged to set them to
# fit your needs.
#
# Please refer to systemd.unit(5), systemd.service(5), and systemd.exec(5) for
# more information.
[Unit]
Description=Valkey data structure server
Documentation=https://github.com/valkey-io/valkey-doc
#Before=your_application.service another_example_application.service
#AssertPathExists=/var/lib/valkey
Wants=network-online.target
After=network-online.target
[Service]
ExecStart=/usr/local/bin/valkey-server --supervised systemd --daemonize no
## Alternatively, have valkey-server load a configuration file:
#ExecStart=/usr/local/bin/valkey-server /path/to/your/valkey.conf
LimitNOFILE=10032
NoNewPrivileges=yes
#OOMScoreAdjust=-900
#PrivateTmp=yes
Type=notify
TimeoutStartSec=infinity
TimeoutStopSec=infinity
UMask=0077
#User=valkey
#Group=valkey
#WorkingDirectory=/var/lib/valkey
[Install]
WantedBy=multi-user.target