~jan0sch/smederee
Showing details for patch 297816501b643663c4fb4f9f8b15cba6d4c0ae14.
diff -rN -u old-smederee/modules/hub/src/universal/conf/application.conf.sample new-smederee/modules/hub/src/universal/conf/application.conf.sample --- old-smederee/modules/hub/src/universal/conf/application.conf.sample 1970-01-01 00:00:00.000000000 +0000 +++ new-smederee/modules/hub/src/universal/conf/application.conf.sample 2025-01-15 23:54:47.467682697 +0000 @@ -0,0 +1,283 @@ +############################################################################### +### Example configuration for running hub and ticket service on localhost. ### +############################################################################### + +hub { + # Configuration of the database. + # Defaults are given except for password and can also be overridden via + # environment variables. + database { + # The class name of the JDBC driver to be used. + driver = "org.postgresql.Driver" + driver = ${?SMEDEREE_HUB_DB_DRIVER} + # The JDBC connection URL **without** username and password. + url = "jdbc:postgresql://localhost/smederee" + url = ${?SMEDEREE_HUB_DB_URL} + # The username (login) needed to authenticate against the database. + user = "smederee_hub" + user = ${?SMEDEREE_HUB_DB_USER} + # The password needed to authenticate against the database. + pass = "secret" + pass = ${?SMEDEREE_HUB_DB_PASS} + } + + # The general service configuration. + # Settings which toggle something on or off are booleans (true / false). + service { + # The hostname on which the service shall listen for requests. + host = "localhost" + # The TCP port number on which the service shall listen for requests. + port = 8080 + # A directory into which files are written that are supposed to be downloaded by users (e.g. distribution + # files of repositories). + download-directory = /var/tmp/smederee/download + download-directory = ${?SMEDEREE_DOWNLOAD_DIR} + + # Settings affecting how the service will communicate several information to + # the "outside world" e.g. if it runs behind a reverse proxy. + external { + # The official hostname of the service which will be used for the CSRF + # protection, generation of links in e-mails etc. + host = ${hub.service.host} + + # A possible path prefix that will be prepended to any paths used in link + # generation. If no path prefix is used then you MUST either comment it out + # or set it to `path = null`! + #path = null + + # The port number which defaults to the port the service is listening on. + # Please note that this is also relevant for CSRF protection! + # If the service is running behind a reverse proxy on a standard port e.g. + # 80 or 443 (http or https) then you MUST set this either to `port = null` + # or comment it out! + port = ${hub.service.port} + + # The URL scheme which is used for links and will also determine if cookies + # will have the secure flag enabled. + # Valid options are: + # - http + # - https + scheme = "http" + } + + # Authentication / login settings + authentication { + enabled = true + + # The secret used for the cookie encryption and validation. + # Using the default should produce a warning message on startup. + cookie-secret = "CHANGEME" + + # Determines after how many failed login attempts an account gets locked. + lock-after = 5 + + # Timeouts for the authentication session. + timeouts { + # The maximum allowed age an authentication session. This setting will + # affect the invalidation of a session on the server side. + # This timeout MUST be triggered regardless of session activity. + absolute-timeout = 3 days + + # This timeout defines how long after the last activity a session will + # remain valid. + idle-timeout = 30 minutes + + # The time after which a session will be renewed (a new session ID will be + # generated). + renewal-timeout = 20 minutes + } + } + + # Billing / payment related settings + billing { + enabled = false + + # Settings for the Stripe API used for billing. + stripe { + api-key = ${?STRIPE_API_KEY} + secret-key = ${?STRIPE_SECRET_KEY} + } + } + + # Configuration for the darcs module for vcs related operations via darcs. + darcs { + # The directory used to store the actual repositories structured after owner. + # ``` + # repositories-directory + # \_ user1 + # \_ repo1 + # \_ repo2 + # \_ user2 + # \_ repo1 + # ``` + repositories-directory = /var/tmp/smederee/darcs + repositories-directory = ${?SMEDEREE_DARCS_REPOS_DIR} + # The path to the darcs binary executable. If not a full path (i.e. just + # `darcs`) it must be present on the `$PATH` of the environment under which + # the server is running. + executable = "darcs" + executable = ${?SMEDEREE_DARCS_EXECUTABLE} + } + + # The email middleware configuration for sending email messages. + email { + # The hostname of the email server (SMTP) to connect to. + host = "localhost" + host = ${?EMAIL_HOST} + # The port number to be used for the connection. + # This is usually 25 for local sendmail connections and 465 for SMTPS or 587 SMTP_TLS connections. + port = 25 + port = ${?EMAIL_PORT} + # Specify the transport method (security) to be used for the connection (should either be SMTPS or TLS). + transport = "PLAIN" + transport = ${?EMAIL_TRANSPORT} + # An optional username if authentication is required. + username = ${?EMAIL_USERNAME} + # An optional password if authentication is required. + password = ${?EMAIL_PASSWORD} + } + + # SSH server component settings + ssh { + enabled = true + # A username for generic access to services for darcs clone, pull and push + # (e.g. `darcs pull genericUser@smederee-domain:accountName/repository`). + generic-user = "darcs" + # The hostname/address the SSH server will bind to. + host = "localhost" + host = ${?SSH_SERVER_HOST} + # The port number on which the SSH server will listen. + port = 30983 + port = ${?SSH_SERVER_PORT} + # A path to the file from which the server key is loaded and also written to if it needs to be generated. + # This file should only be accessible for the user account that runs the smederee service. + server-key-file = /var/tmp/smederee/server.key + server-key-file = ${?SSH_SERVER_KEY} + } + + # Signup / registration related settings. + signup { + enabled = true + } + + # Configuration regarding the integration with the ticket service. + ticket-integration { + enabled = true + # The base URI used to build links to the ticket service. + base-uri = "http://localhost:8080" + base-uri = ${?SMEDEREE_TICKET_BASE_URI} + } + } +} + +tickets { + # Authentication / login settings + authentication { + enabled = true + + # The name used for the authentication cookie. + cookie-name = "sloetel" + + # The secret used for the cookie encryption and validation. + # Using the default should produce a warning message on startup. + cookie-secret = "CHANGEME" + + # Determines after how many failed login attempts an account gets locked. + lock-after = 5 + + # Timeouts for the authentication session. + timeouts { + # The maximum allowed age an authentication session. This setting will + # affect the invalidation of a session on the server side. + # This timeout MUST be triggered regardless of session activity. + absolute-timeout = 3 days + + # This timeout defines how long after the last activity a session will + # remain valid. + idle-timeout = 30 minutes + + # The time after which a session will be renewed (a new session ID will be + # generated). + renewal-timeout = 20 minutes + } + } + + # Configuration of the CSRF protection middleware. + csrf-protection { + # The official hostname of the service which will be used for the CSRF + # protection. + host = ${tickets.service.host} + + # The port number which defaults to the port the service is listening on. + # If the service is running behind a reverse proxy on a standard port e.g. + # 80 or 443 (http or https) then you MUST set this either to `port = null` + # or comment it out! + port = ${tickets.service.port} + + # The URL scheme which is used for links and will also determine if cookies + # will have the secure flag enabled. + # Valid options are: + # - http + # - https + scheme = "http" + } + + # Configuration of the database. + # Defaults are given except for password and can also be overridden via + # environment variables. + database { + # The class name of the JDBC driver to be used. + driver = "org.postgresql.Driver" + driver = ${?SMEDEREE_TICKETS_DB_DRIVER} + # The JDBC connection URL **without** username and password. + url = "jdbc:postgresql://localhost/smederee" + url = ${?SMEDEREE_TICKETS_DB_URL} + # The username (login) needed to authenticate against the database. + user = "smederee_tickets" + user = ${?SMEDEREE_TICKETS_DB_USER} + # The password needed to authenticate against the database. + pass = "secret" + pass = ${?SMEDEREE_TICKETS_DB_PASS} + } + + # Settings affecting how the service will communicate several information to + # the "outside world" e.g. if it runs behind a reverse proxy. + external-url { + # The official hostname of the service which will be used for the generation + # of links. + host = ${tickets.service.host} + + # A possible path prefix that will be prepended to any paths used in link + # generation. If no path prefix is used then you MUST either comment it out + # or set it to `path = null`! + #path = null + + # The port number which defaults to the port the service is listening on. + # If the service is running behind a reverse proxy on a standard port e.g. + # 80 or 443 (http or https) then you MUST set this either to `port = null` + # or comment it out! + port = ${tickets.service.port} + + # The URL scheme which is used for links and will also determine if cookies + # will have the secure flag enabled. + # Valid options are: + # - http + # - https + scheme = "http" + } + + # Configuration regarding the integration with the hub service. + hub-integration { + # The base URI used to build links to the hub service. + base-uri = "http://localhost:8080" + base-uri = ${?SMEDEREE_HUB_BASE_URI} + } + + # Generic service configuration. + service { + # The hostname on which the service shall listen for requests. + host = "localhost" + # The TCP port number on which the service shall listen for requests. + port = 8080 + } +}