Pressing "enter" at all choices in generate-config now uses the default (example) values. There might be an easier or nicer way to achieve this, but I just put in another optional argument at every choice. Ideally it should look like
Enter web served URL, e.g. http://localhost:8089/ or https://example.com/
url [http://localhost:8089/]:
For now it does not display the default value, but you can actually create a new default configuration by just pressing enter at all choices for a quick installation:
root@c9cab6467046:/app/helpcovid# ./generate-config.py
Starting HelpCovid configuration generator...
See https://github.com/bstarynk/helpcovid and its README.md
==== HelpCovid web configuration =====
Enter web served URL, e.g. http://localhost:8089/ or https://example.com/
url:
http://localhost:8089/
[url = http://localhost:8089/]
Enter web document root, a local directory containing web served resources (e.g. HTML files, CSS stylesheets)
... e.g. /app/helpcovid/webroot/
root:
/app/helpcovid/webroot/
[root = /app/helpcovid/webroot/]
Enter the OpenSSL public certificate, for HTTPS - can be left empty; see https://www.openssl.org/
sslcert:
[sslcert = ]
Enter the OpenSSL private key, for HTTPS
sskey:
[sskey = ]
==== HelpCovid PostGreSQL database configuration, see https://www.postgresql.org/ ====
Enter the PostGreSQL connnection string, see https://www.postgresql.org/docs/current/libpq-connect.html
Example: dbname=helpcovid_db user=helpcovid_usr password=passwd1234 hostaddr=127.0.0.1 port=5432
connection:
dbname=helpcovid_db user=helpcovid_usr password=passwd1234 hostaddr=127.0.0.1 port=5432
[connection = dbname=helpcovid_db user=helpcovid_usr password=passwd1234 hostaddr=127.0.0.1 port=5432]
Enter *full path* of the HelpCovid PostgreSQL password file
... e.g. /root/.helpcovid-pg-password
passfile:
/root/.helpcovid-pg-password
[passfile = /root/.helpcovid-pg-password]
==== HelpCovid HTML template tags configuration ====
Enter HTML for <?hcv_datacontroller?>
Example: <a href="mailto:john.doe@example.org>John Doe</a>
hcv_datacontroller_tag:
<a href="mailto:john.doe@example.org>John Doe</a>
[hcv_datacontroller_tag = <a href="mailto:john.doe@example.org>John Doe</a>]
Configuration file saved to /root/.helpcovidrc]
Creating database...
psql:/tmp/tmpi8g5revvhelpcovid:8: NOTICE: user already exists; skipping...
DO
ALTER ROLE
ALTER ROLE
ALTER ROLE
GRANT
removed '/tmp/tmpi8g5revvhelpcovid'
Password file created at /root/.helpcovid-pg-password
root@c9cab6467046:/app/helpcovid#
Pressing "enter" at all choices in generate-config now uses the default (example) values. There might be an easier or nicer way to achieve this, but I just put in another optional argument at every choice. Ideally it should look like
For now it does not display the default value, but you can actually create a new default configuration by just pressing enter at all choices for a quick installation: