summarylogtreecommitdiffstats
path: root/cockroach.service
diff options
context:
space:
mode:
Diffstat (limited to 'cockroach.service')
-rw-r--r--cockroach.service19
1 files changed, 19 insertions, 0 deletions
diff --git a/cockroach.service b/cockroach.service
new file mode 100644
index 00000000000..e4bde93d403
--- /dev/null
+++ b/cockroach.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=CockroachDB database server
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+User=cockroach
+Group=cockroach
+
+EnvironmentFile=-/etc/default/cockroach
+ExecStart=/usr/bin/cockroach start --certs-dir /etc/cockroach --store=${COCKROACH_STORE} $COCKROACH_FLAGS
+LimitNOFILE=35000
+
+ProtectHome=true
+ProtectSystem=full
+NoNewPrivileges=true
+
+[Install]
+WantedBy=multi-user.target