From: Karl O. Pinc Date: Sat, 14 Dec 2019 03:04:27 +0000 (-0600) Subject: Reorganize examples dir as relative to target destination X-Git-Url: https://papio.biology.duke.edu/gitweb/?a=commitdiff_plain;h=9d4472a423ed19734054c3c07dfd95ecf37be0b4;p=pgwui_server Reorganize examples dir as relative to target destination --- diff --git a/examples/development.ini b/examples/development.ini deleted file mode 100644 index 057c3e4..0000000 --- a/examples/development.ini +++ /dev/null @@ -1,197 +0,0 @@ -### -# PGWUI_Server configuration -# -# Configuration changes require a server restart! -# (But see the pserve command's --reload option.) -### - -[app:main] - -# PasteDeploy configuration -# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/paste.html#pastedeploy-entry-points - -use = egg:PGWUI_Server - - -# -# PGWUI configuration -# - -# Postgres client configuration. - -# Both pgwui.pg_host and pgwui.pg_port are optional; -# they default to the Unix PG socket and the default Postgres port. -# An empty string for host means use the unix socket. -pgwui.pg_host = -pgwui.pg_port = 5432 - -# There are occasions when PGWUI uses a default database. (optional) -pgwui.default_db = template1 - -# What PGWUI modules to use. -pyramid.includes = - pgwui_logout - pgwui_upload - pyramid_debugtoolbar - -# Whether or not to change the db content. (required) -pgwui.dry_run = False - -# Routing - -# Routes are what call up specific pages. They are usually the -# part of the URL which comes after the http://example.com. -# -# All routes should probably begin with a "/" character but -# if they do not a "/" will be automatically prepended. -# -# A full URL may be given as a route. The is useful for redirecting -# to other sites. -# -# For more information on route syntax see: -# https://docs.pylonsproject.org/projects/pyramid/en/master/narr/urldispatch.html#route-pattern-syntax - -# A prefix for all routes. (optional) If the prefix is "/a/b/c" then -# all URLs will begin with something like: http://example.com/a/b/c -# The default is no prefix. -# pgwui.route_prefix = - -# Overriding routes of specific PGWUI components - -# The syntax is "name" = "route", one per line. The "name" is the -# name of the PGWUI component. "route" is the route to use to access -# the component. So to access the logout page at -# http://example.com/logmeout the line would be: logout = /logmeout -# -# Overriding routes is optional. -# -# The default for some PGWUI components are: -# pgwui.routes = -# logout = /logout -# upload = /upload - -# Settings validation - -# Whether or not to validate the session.secret setting. (optional) -# session.secret must be valid to detect Cross-Site Request Forgery (CSRF) -# vulnerabilties. Validation is on by default. -pgwui.validate_hmac = False - -# Take uploaded column headings literally? -# The available choices are: -# on The file's column headings, as typed, are the table's column names. -# off The file's column headings are case-insensitive. -# ask Put a "Take Column Headings Literally" checkbox on the upload screen. -# Optional setting. The default is "off". -# -# Caution: Non-ASCII column names, particularly in the Turkish locale, -# are not guaranteed to be case-insensitive. -pgwui.literal_column_headings = off - - -# -# Pyramid configuration -# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html -# -pyramid.reload_templates = True -pyramid.debug_authorization = False -pyramid.debug_notfound = False -pyramid.debug_routematch = False -pyramid.default_locale_name = en -#pyramid.includes = -# pyramid_debugtoolbar - -# For turning off the toolbar -#pyramid.debug_authorization = False -#pyramid.debug_notfound = False -#pyramid.debug_routematch = False -#pyramid.default_locale_name = en - -# By default, the toolbar only appears for clients from IP addresses -# '127.0.0.1' and '::1'. -# debugtoolbar.hosts = 127.0.0.1 ::1 - - -# -# Beaker session management configuration -# https://beaker.readthedocs.io/en/latest/configuration.html -# -session.type = memory -session.lock_dir = /var/lock/pgwui_server -# Remove cookie in browser on browser close. -session.cookie_expires = True -session.key = pgwui_server -# HMAC secret -#session.secret = xxxxxxrandomstring40characterslongxxxxxx -# Send cookie only over https -# (True for production) -session.secure = False -# Sessions timeout after an hour if unused. -session.timeout = 3600 -# Pyramid sends cookies for exception pages -session.cookie_on_exception = True - - -# -# Mako templates -# -#mako.strict_undefined = True - - -### -# wsgi server configuration -### - -[server:main] -use = egg:waitress#main - -# A value for "host" of "*", instead of "127.0.0.1", exposes the -# application to the network. Unless you trust everyone and every -# device that might access your network this will, at minimum, expose -# what could be highly sensitive information. See the documentation -# for more secure alternatives. -host = 127.0.0.1 -port = 6543 - - -### -# logging configuration -# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html -### - -[loggers] -keys = root, pgwui_server, pgwui_upload - -[handlers] -keys = console - -[formatters] -keys = generic - -[logger_root] -level = INFO -handlers = console - -[handler_console] -class = StreamHandler -args = (sys.stderr,) -level = NOTSET -formatter = generic - -[formatter_generic] -format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s - -# These sections don't do anything as given. They are provided so that -# logging can be customized per pgwui package. You may want to add -# "propagate = False" lines to avoid duplicate logging if you customize -# them to emit log messages. - -[logger_pgwui_server] -level = DEBUG -handlers = -qualname = pgwui_server - -[logger_pgwui_upload] -level = DEBUG -handlers = -qualname = pgwui_upload diff --git a/examples/etc/pgwui.ini b/examples/etc/pgwui.ini new file mode 100644 index 0000000..28ee039 --- /dev/null +++ b/examples/etc/pgwui.ini @@ -0,0 +1,203 @@ +### +# PGWUI_Server configuration +# +# Configuration changes require a server restart! +# (Unless you've done something not recommended to start the server.) +### + +[app:main] + +# PasteDeploy configuration +# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/paste.html#pastedeploy-entry-points + +use = egg:PGWUI_Server + + +# +# PGWUI configuration +# + +# Postgres client configuration. + +# Both pgwui.pg_host and pgwui.pg_port are optional; +# they default to the Unix PG socket and the default Postgres port. +# An empty string for host means use the unix socket. +pgwui.pg_host = +pgwui.pg_port = 5432 + +# There are occasions when PGWUI uses a default database. (optional) +pgwui.default_db = template1 + +# What PGWUI modules to use. +pyramid.includes = + pgwui_logout + pgwui_upload + +# Whether or not to change the db content. (required) +pgwui.dry_run = False + +# Routing + +# Routes are what call up specific pages. They are the +# part of the URL which comes after the http://example.com. +# +# All routes should probably begin with a "/" character but +# if they do not a "/" will be automatically prepended. +# +# A full URL may be given as a route. The is useful for redirecting +# to other sites. +# +# For more information on route syntax see: +# https://docs.pylonsproject.org/projects/pyramid/en/master/narr/urldispatch.html#route-pattern-syntax + +# A prefix for all routes. (optional) If the prefix is "/a/b/c" then +# all URLs will begin with something like: http://example.com/a/b/c +# The default is no prefix. +# pgwui.route_prefix = + +# Overriding routes of specific PGWUI components + +# The syntax is "name" = "route", one per line. The "name" is the +# name of the PGWUI component. "route" is the route to use to access +# the component. So to access the logout page at +# http://example.com/logmeout the line would be: logout = /logmeout +# +# Overriding routes is optional. +# +# The default for some PGWUI components are: +# pgwui.routes = +# logout = /logmeout +# upload = /put-in + +# Settings validation + +# Whether or not to validate the session.secret setting. (optional) +# session.secret must be valid to detect Cross-Site Request Forgery (CSRF) +# vulnerabilties. Validation is on by default. +# pgwui.validate_hmac = True + +# Take uploaded column headings literally? +# The available choices are: +# on The file's column headings, as typed, are the table's column names. +# off The file's column headings are case-insensitive. +# ask Put a "Take Column Headings Literally" checkbox on the upload screen. +# Optional setting. The default is "off". +# +# Caution: Non-ASCII column names, particularly in the Turkish locale, +# are not guaranteed to be case-insensitive. +pgwui.literal_column_headings = off + + +# +# Pyramid configuration +# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html +# +pyramid.reload_templates = False +pyramid.debug_authorization = False +pyramid.debug_notfound = False +pyramid.debug_routematch = False +pyramid.default_locale_name = en + + +# +# Beaker session management configuration +# https://beaker.readthedocs.io/en/latest/configuration.html +# +session.type = memory +session.lock_dir = /var/lock/pgwui_server +# Remove cookie in browser on browser close. +session.cookie_expires = True +session.key = pgwui_server +# HMAC secret +#session.secret = xxxxxxrandomstring40characterslongxxxxxx +# Send cookie only over https +session.secure = True +# Sessions timeout after an hour if unused. +session.timeout = 3600 +# Pyramid sends cookies for exception pages +session.cookie_on_exception = True + + +# +# Mako templates +# +#mako.strict_undefined = True + + +### +# wsgi server configuration +### + +[server:main] +# When using a standalone WSGI server like uwsgi or Apache's mod_wsgi +# use the pgwui_server's WSGI. +#use = egg:PGWUI_Server + +# Use waitress as the webserver and configure a reverse-proxy to the network. +# +# An Nginx (https://www.nginx.org) reverse-proxy configuration might look like: +# +# location / { +# proxy_pass http://localhost:6543; +# proxy_set_header Host $host; +# proxy_set_header X-Real-IP $remote_addr; +# } +# +use = egg:waitress#main + +# A value for "host" of "*", instead of "127.0.0.1", exposes the +# application to the network. Unless you trust everyone and every +# device that might access your network this will, at minimum, expose +# what could be highly sensitive information. See the documentation +# for more secure alternatives. +host = 127.0.0.1 +port = 6543 + + +### +# logging configuration +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html +### + +[loggers] +keys = root, pgwui_server, pgwui_upload + +[handlers] +keys = syslog, console + +[formatters] +keys = generic + +[logger_root] +level = WARN +handlers = console + +[handler_syslog] +class = logging.handlers.SysLogHandler +args = ('/dev/log',) +level = NOTSET +formatter = generic + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s + +# These sections don't do anything as given. They are provided so that +# logging can be customized per pgwui package. You may want to add +# "propagate = False" lines to avoid duplicate logging if you customize +# them to emit log messages. + +[logger_pgwui_server] +level = INFO +handlers = +qualname = pgwui_server + +[logger_pgwui_upload] +level = INFO +handlers = +qualname = pgwui_upload diff --git a/examples/misc/development.ini b/examples/misc/development.ini new file mode 100644 index 0000000..057c3e4 --- /dev/null +++ b/examples/misc/development.ini @@ -0,0 +1,197 @@ +### +# PGWUI_Server configuration +# +# Configuration changes require a server restart! +# (But see the pserve command's --reload option.) +### + +[app:main] + +# PasteDeploy configuration +# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/paste.html#pastedeploy-entry-points + +use = egg:PGWUI_Server + + +# +# PGWUI configuration +# + +# Postgres client configuration. + +# Both pgwui.pg_host and pgwui.pg_port are optional; +# they default to the Unix PG socket and the default Postgres port. +# An empty string for host means use the unix socket. +pgwui.pg_host = +pgwui.pg_port = 5432 + +# There are occasions when PGWUI uses a default database. (optional) +pgwui.default_db = template1 + +# What PGWUI modules to use. +pyramid.includes = + pgwui_logout + pgwui_upload + pyramid_debugtoolbar + +# Whether or not to change the db content. (required) +pgwui.dry_run = False + +# Routing + +# Routes are what call up specific pages. They are usually the +# part of the URL which comes after the http://example.com. +# +# All routes should probably begin with a "/" character but +# if they do not a "/" will be automatically prepended. +# +# A full URL may be given as a route. The is useful for redirecting +# to other sites. +# +# For more information on route syntax see: +# https://docs.pylonsproject.org/projects/pyramid/en/master/narr/urldispatch.html#route-pattern-syntax + +# A prefix for all routes. (optional) If the prefix is "/a/b/c" then +# all URLs will begin with something like: http://example.com/a/b/c +# The default is no prefix. +# pgwui.route_prefix = + +# Overriding routes of specific PGWUI components + +# The syntax is "name" = "route", one per line. The "name" is the +# name of the PGWUI component. "route" is the route to use to access +# the component. So to access the logout page at +# http://example.com/logmeout the line would be: logout = /logmeout +# +# Overriding routes is optional. +# +# The default for some PGWUI components are: +# pgwui.routes = +# logout = /logout +# upload = /upload + +# Settings validation + +# Whether or not to validate the session.secret setting. (optional) +# session.secret must be valid to detect Cross-Site Request Forgery (CSRF) +# vulnerabilties. Validation is on by default. +pgwui.validate_hmac = False + +# Take uploaded column headings literally? +# The available choices are: +# on The file's column headings, as typed, are the table's column names. +# off The file's column headings are case-insensitive. +# ask Put a "Take Column Headings Literally" checkbox on the upload screen. +# Optional setting. The default is "off". +# +# Caution: Non-ASCII column names, particularly in the Turkish locale, +# are not guaranteed to be case-insensitive. +pgwui.literal_column_headings = off + + +# +# Pyramid configuration +# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html +# +pyramid.reload_templates = True +pyramid.debug_authorization = False +pyramid.debug_notfound = False +pyramid.debug_routematch = False +pyramid.default_locale_name = en +#pyramid.includes = +# pyramid_debugtoolbar + +# For turning off the toolbar +#pyramid.debug_authorization = False +#pyramid.debug_notfound = False +#pyramid.debug_routematch = False +#pyramid.default_locale_name = en + +# By default, the toolbar only appears for clients from IP addresses +# '127.0.0.1' and '::1'. +# debugtoolbar.hosts = 127.0.0.1 ::1 + + +# +# Beaker session management configuration +# https://beaker.readthedocs.io/en/latest/configuration.html +# +session.type = memory +session.lock_dir = /var/lock/pgwui_server +# Remove cookie in browser on browser close. +session.cookie_expires = True +session.key = pgwui_server +# HMAC secret +#session.secret = xxxxxxrandomstring40characterslongxxxxxx +# Send cookie only over https +# (True for production) +session.secure = False +# Sessions timeout after an hour if unused. +session.timeout = 3600 +# Pyramid sends cookies for exception pages +session.cookie_on_exception = True + + +# +# Mako templates +# +#mako.strict_undefined = True + + +### +# wsgi server configuration +### + +[server:main] +use = egg:waitress#main + +# A value for "host" of "*", instead of "127.0.0.1", exposes the +# application to the network. Unless you trust everyone and every +# device that might access your network this will, at minimum, expose +# what could be highly sensitive information. See the documentation +# for more secure alternatives. +host = 127.0.0.1 +port = 6543 + + +### +# logging configuration +# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html +### + +[loggers] +keys = root, pgwui_server, pgwui_upload + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = INFO +handlers = console + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s + +# These sections don't do anything as given. They are provided so that +# logging can be customized per pgwui package. You may want to add +# "propagate = False" lines to avoid duplicate logging if you customize +# them to emit log messages. + +[logger_pgwui_server] +level = DEBUG +handlers = +qualname = pgwui_server + +[logger_pgwui_upload] +level = DEBUG +handlers = +qualname = pgwui_upload diff --git a/examples/pgwui.ini b/examples/pgwui.ini deleted file mode 100644 index 28ee039..0000000 --- a/examples/pgwui.ini +++ /dev/null @@ -1,203 +0,0 @@ -### -# PGWUI_Server configuration -# -# Configuration changes require a server restart! -# (Unless you've done something not recommended to start the server.) -### - -[app:main] - -# PasteDeploy configuration -# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/paste.html#pastedeploy-entry-points - -use = egg:PGWUI_Server - - -# -# PGWUI configuration -# - -# Postgres client configuration. - -# Both pgwui.pg_host and pgwui.pg_port are optional; -# they default to the Unix PG socket and the default Postgres port. -# An empty string for host means use the unix socket. -pgwui.pg_host = -pgwui.pg_port = 5432 - -# There are occasions when PGWUI uses a default database. (optional) -pgwui.default_db = template1 - -# What PGWUI modules to use. -pyramid.includes = - pgwui_logout - pgwui_upload - -# Whether or not to change the db content. (required) -pgwui.dry_run = False - -# Routing - -# Routes are what call up specific pages. They are the -# part of the URL which comes after the http://example.com. -# -# All routes should probably begin with a "/" character but -# if they do not a "/" will be automatically prepended. -# -# A full URL may be given as a route. The is useful for redirecting -# to other sites. -# -# For more information on route syntax see: -# https://docs.pylonsproject.org/projects/pyramid/en/master/narr/urldispatch.html#route-pattern-syntax - -# A prefix for all routes. (optional) If the prefix is "/a/b/c" then -# all URLs will begin with something like: http://example.com/a/b/c -# The default is no prefix. -# pgwui.route_prefix = - -# Overriding routes of specific PGWUI components - -# The syntax is "name" = "route", one per line. The "name" is the -# name of the PGWUI component. "route" is the route to use to access -# the component. So to access the logout page at -# http://example.com/logmeout the line would be: logout = /logmeout -# -# Overriding routes is optional. -# -# The default for some PGWUI components are: -# pgwui.routes = -# logout = /logmeout -# upload = /put-in - -# Settings validation - -# Whether or not to validate the session.secret setting. (optional) -# session.secret must be valid to detect Cross-Site Request Forgery (CSRF) -# vulnerabilties. Validation is on by default. -# pgwui.validate_hmac = True - -# Take uploaded column headings literally? -# The available choices are: -# on The file's column headings, as typed, are the table's column names. -# off The file's column headings are case-insensitive. -# ask Put a "Take Column Headings Literally" checkbox on the upload screen. -# Optional setting. The default is "off". -# -# Caution: Non-ASCII column names, particularly in the Turkish locale, -# are not guaranteed to be case-insensitive. -pgwui.literal_column_headings = off - - -# -# Pyramid configuration -# https://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html -# -pyramid.reload_templates = False -pyramid.debug_authorization = False -pyramid.debug_notfound = False -pyramid.debug_routematch = False -pyramid.default_locale_name = en - - -# -# Beaker session management configuration -# https://beaker.readthedocs.io/en/latest/configuration.html -# -session.type = memory -session.lock_dir = /var/lock/pgwui_server -# Remove cookie in browser on browser close. -session.cookie_expires = True -session.key = pgwui_server -# HMAC secret -#session.secret = xxxxxxrandomstring40characterslongxxxxxx -# Send cookie only over https -session.secure = True -# Sessions timeout after an hour if unused. -session.timeout = 3600 -# Pyramid sends cookies for exception pages -session.cookie_on_exception = True - - -# -# Mako templates -# -#mako.strict_undefined = True - - -### -# wsgi server configuration -### - -[server:main] -# When using a standalone WSGI server like uwsgi or Apache's mod_wsgi -# use the pgwui_server's WSGI. -#use = egg:PGWUI_Server - -# Use waitress as the webserver and configure a reverse-proxy to the network. -# -# An Nginx (https://www.nginx.org) reverse-proxy configuration might look like: -# -# location / { -# proxy_pass http://localhost:6543; -# proxy_set_header Host $host; -# proxy_set_header X-Real-IP $remote_addr; -# } -# -use = egg:waitress#main - -# A value for "host" of "*", instead of "127.0.0.1", exposes the -# application to the network. Unless you trust everyone and every -# device that might access your network this will, at minimum, expose -# what could be highly sensitive information. See the documentation -# for more secure alternatives. -host = 127.0.0.1 -port = 6543 - - -### -# logging configuration -# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html -### - -[loggers] -keys = root, pgwui_server, pgwui_upload - -[handlers] -keys = syslog, console - -[formatters] -keys = generic - -[logger_root] -level = WARN -handlers = console - -[handler_syslog] -class = logging.handlers.SysLogHandler -args = ('/dev/log',) -level = NOTSET -formatter = generic - -[handler_console] -class = StreamHandler -args = (sys.stderr,) -level = NOTSET -formatter = generic - -[formatter_generic] -format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s - -# These sections don't do anything as given. They are provided so that -# logging can be customized per pgwui package. You may want to add -# "propagate = False" lines to avoid duplicate logging if you customize -# them to emit log messages. - -[logger_pgwui_server] -level = INFO -handlers = -qualname = pgwui_server - -[logger_pgwui_upload] -level = INFO -handlers = -qualname = pgwui_upload