[Unit] Description=Prompt sync server Documentation=https://gitea.tzgyn.dev/TZGyn/prompt After=network-online.target postgresql.service Wants=network-online.target [Service] # The binary is built on a Mac with: # GOOS=linux GOARCH=arm64 go build -o prompt-sync . ExecStart=/usr/local/bin/prompt-sync Environment=PROMPT_SYNC_ADDR=:8080 Environment=PROMPT_SYNC_DATABASE_URL=postgres://prompt:CHANGE_ME@localhost:5432/prompt_sync?sslmode=disable Restart=on-failure RestartSec=2 # The server only needs to talk to Postgres and bind :8080. NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ProtectHome=true [Install] WantedBy=multi-user.target