Browse Source

Add example systemd configuration

asonix 1 year ago
parent
commit
359ec68aa0
3 changed files with 45 additions and 0 deletions
  1. 15 0
      systemd/example-relay.service
  2. 19 0
      systemd/example-relay.service.env
  3. 11 0
      systemd/example-relay.socket

+ 15 - 0
systemd/example-relay.service

@@ -0,0 +1,15 @@
+[Unit]
+Description=Activitypub Relay
+Documentation=https://git.asonix.dog/asonix/relay
+Wants=network.target
+After=network.target
+
+[Install]
+WantedBy=multi-user.target
+
+[Service]
+Type=simple
+EnvironmentFile=/etc/systemd/system/example-relay.service.env
+ExecStart=/path/to/relay
+Restart=always
+

+ 19 - 0
systemd/example-relay.service.env

@@ -0,0 +1,19 @@
+HOSTNAME='relay.example.com'
+ADDR='0.0.0.0'
+PORT='8080'
+RESTRICTED_MODE='true'
+VALIDATE_SIGNATURES='true'
+HTTPS='true'
+PRETTY_LOG='false'
+PUBLISH_BLOCKS='true'
+DEBUG='false'
+SLED_PATH='/opt/sled'
+TELEGRAM_ADMIN_HANDLE='myhandle'
+RUST_BACKTRACE='full'
+FOOTER_BLURB='Contact <a href="https://masto.example.com/@example">@example</a> for inquiries.'
+LOCAL_DOMAINS='masto.example.com'
+LOCAL_BLURB='<p>An ActivityPub relay for servers. Currently running somewhere. Let me know if you want to join!</p>'
+OPENTELEMETRY_URL='http://otel.example.com:4317'
+API_TOKEN='blahblahblahblahblahblahblah'
+TELEGRAM_TOKEN='blahblahblahblahblahblahblah'
+

+ 11 - 0
systemd/example-relay.socket

@@ -0,0 +1,11 @@
+[Unit]
+Description=Activitypub Relay Socket
+Before=multi-user.target
+After=network.target
+
+[Socket]
+Service=example-relay.service
+ListenStream=8080
+
+[Install]
+WantedBy=sockets.target