sosedoff / pgweb

Cross-platform client for PostgreSQL databases
https://sosedoff.github.io/pgweb
MIT License
8.63k stars 732 forks source link

Brew formula and service #315

Closed peteyycz closed 6 years ago

peteyycz commented 6 years ago

With homebrew we could enable the users for easy install and automatic startup (and restart) for pgweb for seamless control 👍

sosedoff commented 6 years ago

Pgweb is already distributed via homebrew cask, however i'm not sure if casks support plists. Since im a pgweb developer i dont really use the service plist, however i've made one before and it worked fine. I just posted my question on homebrew-caskroom to figure out if this is something we can add.

Here's the plist that works with the latest pgweb installed from the cask:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>KeepAlive</key>
  <true/>
  <key>Label</key>
  <string>homebrew.mxcl.pgweb</string>
  <key>ProgramArguments</key>
  <array>
    <string>/usr/local/Caskroom/pgweb/0.9.9/pgweb_darwin_amd64</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>StandardErrorPath</key>
  <string>/usr/local/var/log/pgweb.error.log</string>
  <key>StandardOutPath</key>
  <string>/usr/local/var/log/pgweb.log</string>
</dict>
</plist>
sosedoff commented 6 years ago

To answer my own question regarding the plist support in homebrew casks: no, its not supported. If we wanted to move pgweb to homebrew core we would have to support building from source, which i don't find useful.