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
 
  • Constructor Details

    • CtanConfiguration

      public CtanConfiguration()