~yerinalexey/gobin

fb75d833d907747761456c6178dc5d92241021d4 — Alexey Yerin 5 months ago 262a5ab
chore: bring systemd units back
2 files changed, 25 insertions(+), 0 deletions(-)

A contrib/systemd/gobin.service
A contrib/systemd/gobin.service.d/environment.conf
A contrib/systemd/gobin.service => contrib/systemd/gobin.service +19 -0
@@ 0,0 1,19 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# This unit runs gobin as a system service. It requires gobin to be
# available in your PATH (/usr/bin, /usr/local/bin, etc). To place it
# there use:
# sudo install ./gobin /usr/local/bin

[Unit]
Description=Simple self-hosted service for sharing text snippets
Requires=network.target

[Service]
Type=simple
ExecStart=gobin
Environment="TEMPLATE_ROOT=/usr/share/gobin/templates"
Environment="STATIC_ROOT=/usr/share/gobin/static"

[Install]
WantedBy=multi-user.target

A contrib/systemd/gobin.service.d/environment.conf => contrib/systemd/gobin.service.d/environment.conf +6 -0
@@ 0,0 1,6 @@
# This file is a template, edit to your own liking

[Service]
Environment="DATABASE_URI=posgtresql://andrew:super_secret_haha@localhost/pastebin"
Environment="BASE_URL=https://mywebsite.com"
Environment="PORT=80"