# 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