include .coveragerc
# List all the examples, so we don't accidently include editor backups
include examples/etc
+include examples/etc/systemd
+include examples/etc/systemd/system
+include examples/etc/systemd/system/pgwui_server.service
include examples/etc/nginx
include examples/etc/nginx/sites-available
include examples/etc/nginx/sites-available/mysite
http://localhost:6543/logout
-Automating startup at boot time is OS dependent.
+Automating startup at boot time is OS dependent. An example systemd
+configuration is provided with PGWUI_Server.
+
Troubleshooting
^^^^^^^^^^^^^^^
--- /dev/null
+# This example is for Nginx.
+#
+# WantedBy
+
+# Change to the service name for the webserver/reverse proxy of your
+# choice. This will ensure PGWUI_Server is started when the webserver
+# starts.
+#
+# WantedBy works fine when the webserver/reverse proxy communicates
+# over a network socket. When the communication is via a Unix socket
+# Requires and Before or After may be needed. Their use can avoid
+# race conditions and ensure that the Unix socket is created before
+# the opposite end tries to open it.
+#
+# ExecStart
+# Change the paths depending on the location of the Python virtual
+# environment in which PGWUI_Server is installed.
+
+[Unit]
+Description=PGWUI_Server web server
+
+[Service]
+Type=simple
+User=www-data
+ExecStart=/usr/local/lib/pgwui/venv/bin/python -W 'ignore:The psycopg2 wheel package will be renamed from release 2.8::psycopg2' /usr/local/lib/pgwui/venv/bin/pserve /etc/pgwui.ini
+
+[Install]
+WantedBy=nginx.service
+