Closed kblomqvist closed 7 years ago
Thanks for the extra setup script. The only problem i see with it is with hardcoded path to the binary, usually stuff like that should be declared as a variable at the top.
I was not able to solve how to use variables in sudo's -c command flag. Where's the original startup script?
Why would you need sudo to run pgweb? It does not start on port 80
To run pgweb as pgweb user -- not as root.
Oh nvm i misread some of the config stuff. I'll take another look at this when i have time.
I added your example init.d config to the repo.
Here are some steps to run pgweb using systemd (I guess this only works on Ubuntu though):
touch /etc/systemd/system/pgweb.service
[Unit]
Description=pgweb
After=network.target
[Service]
User=webadmin
Group=www-data
WorkingDirectory=/home/webadmin/pgweb
ExecStart=/home/webadmin/pgweb/pgweb_linux_amd64 --listen=9090
[Install]
WantedBy=multi-user.target
Reference on how to create a systemd Unit File.
@andreibancioiu there's a systemd service file at https://github.com/sosedoff/pgweb/blob/master/examples/pgweb.service as well.
I made a startup script for
pgweb
binary. Feel free to put in wiki, maybe with Nginx reverse-proxy example (#84), which is still missing.