Package org.ctan.site
Class CtanConfiguration
java.lang.Object
io.dropwizard.core.Configuration
org.ctan.site.CtanConfiguration
public class CtanConfiguration
extends io.dropwizard.core.Configuration
The class
CtanConfiguration
contains the Dropwizard
configuration specific to the CTAN site.
The configuration is externally stored in a yaml file and read at startup.
The configuration might contain references to environment variables. This can
be achieved with a construct like ${VARIABLE}
. This takes the
value of VARIABLE from the environment. If the variable might not be defined
then ${VARIABLE:-FALLBACK}
can be used to revert to FALLBACK in
this case.
The following example demonstrates the major configuration parameters.
appName: Comprehensive TeX Archive Network version: 3.0.0 #--------------------------------------------------------------------------- # Server settings. server: rootPath: '/api/*' applicationConnectors: - type: http port: 9000 adminConnectors: - type: http port: 9001 #--------------------------------------------------------------------------- # CTAN settings. ctan: defaultLanguage: en languages: - en - de #--------------------------------------------------------------------------- # CTAN searching settings. index: directory: /serv/www/www.ctan.org/index #--------------------------------------------------------------------------- # CTAN content settings. content: directory: /serv/www/www.ctan.org/src/ctan-content #--------------------------------------------------------------------------- # CTAN incoming settings. upload: addendum: /home/ftp/pub/tex/help/ctan/CTAN-upload-addendum.html incoming: /serv/www/www.ctan.org/incoming managers: ctan@ctan.org #--------------------------------------------------------------------------- # CTAN TeX Catalogue settings. catalogue: entries: /serv/www/www.ctan.org/texcatalogue/entries #--------------------------------------------------------------------------- # CTAN tex-archive settings. texArchive: directory: /home/ftp/pub/tex #--------------------------------------------------------------------------- # CTAN ctan-ann settings. ctanAnnounce: directory: /serv/www/www.ctan.org/ctan-ann #--------------------------------------------------------------------------- # MirrMon settings. mirrmon: url: https://ctan.org/mirmon #--------------------------------------------------------------------------- # LUGs database settings. lugs: url: https://www.ntg.nl/lug/lugs/ #--------------------------------------------------------------------------- # Mail settings. mail: smtp: host: localhost port: 587 from: no-reply@ctan.org list: mirror-registration: template: mirror-registration to: ctan@ctan.org #--------------------------------------------------------------------------- # Database settings. site_db: driverClass: org.postgresql.Driver user: ${SITE_DB_USER:-www} password: ${SITE_DB_PASSWD} url: jdbc:postgresql://localhost:5432/${SITE_DB:-portal} properties: charSet: UTF-8 hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect maxWaitForConnection: 1s validationQuery: "SELECT 1" minSize: 8 maxSize: 32 checkConnectionWhileIdle: false mirrors: driverClass: org.postgresql.Driver user: ${MIRRORS_DB_USER:-www} password: ${MIRRORS_DB_PASSWD} url: jdbc:postgresql://localhost:5432/${MIRRORS_DB:-ctan} properties: charSet: UTF-8 hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect maxWaitForConnection: 1s validationQuery: "SELECT 1" minSize: 8 maxSize: 32 checkConnectionWhileIdle: false
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
The classCatalogueConfig
contains the Dropwizard configuration for the Catalogue.static class
The classContentConfig
contains the definition of the sub-configurationcontent
.static class
The classCtanAnnounceConfig
contains the definition of the sub-configurationctanAnnounce
.static class
The classCtanParams
contains the description of the sectionctan
of the configuration.static class
The classIndexConfig
contains the definition of the sub-configurationindex
.static class
The classLugsConfig
contains the Dropwizard configuration for the Lugs.static class
The mail configuration.static class
The SMTP configuration.static class
The SMTP starttls configuration.static class
The mail list type configuration.static class
The classMirrMonConfig
contains the Dropwizard configuration for MirrMon.static class
The classTexArchiveConfig
contains the definition of the sub-configurationtexArchive
.static class
The classUploadConfig
contains the definition of the sub-configurationupload
. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.dropwizard.core.Configuration
getAdminFactory, getHealthFactory, getLoggingFactory, getMetricsFactory, getServerFactory, setAdminFactory, setHealthFactory, setLoggingFactory, setMetricsFactory, setServerFactory, toString
-
Constructor Details
-
CtanConfiguration
public CtanConfiguration()
-