stella-relay.service raw

   1  [Unit]
   2  Description=Stella's Orly Nostr Relay (Docker Compose)
   3  Documentation=https://github.com/Silberengel/next.orly.dev
   4  After=network-online.target docker.service
   5  Wants=network-online.target
   6  Requires=docker.service
   7  
   8  [Service]
   9  Type=oneshot
  10  RemainAfterExit=yes
  11  User=madmin
  12  Group=madmin
  13  WorkingDirectory=/home/madmin/Projects/GitCitadel/next.orly.dev
  14  
  15  # Start the relay using docker compose
  16  ExecStart=/usr/bin/docker compose up -d orly-relay
  17  
  18  # Stop the relay
  19  ExecStop=/usr/bin/docker compose down
  20  
  21  # Reload configuration (restart containers)
  22  ExecReload=/usr/bin/docker compose restart orly-relay
  23  
  24  # Security settings
  25  NoNewPrivileges=true
  26  ProtectSystem=strict
  27  ProtectHome=read-only
  28  ReadWritePaths=/home/madmin/.local/share/orly-relay
  29  ReadWritePaths=/home/madmin/Projects/GitCitadel/next.orly.dev/data
  30  
  31  # Resource limits
  32  LimitNOFILE=65536
  33  LimitNPROC=4096
  34  
  35  # Restart policy
  36  Restart=on-failure
  37  RestartSec=10
  38  TimeoutStartSec=60
  39  TimeoutStopSec=30
  40  
  41  [Install]
  42  WantedBy=multi-user.target
  43