---
# run cmdlineutils/expandyaml.py to see contents of this file after processing

root:

  # Default directory for emen2 items: db, applog, archive, db_hotbackup, emen2files, emen2tiles
  # This should be an absolute path
  root: &root
    /home/emen2/

  # path to Berkeley DB installation
  bdbprefix: &bdbprefix
    /usr/local/BerkeleyDB.4.8/ 

  # path to configuration files -- loaded after this one and overrides it
  configfiles:
    - /etc/emen2config.yml 


base:
  prefix:
      - *root

  # Log directory: access.log, error.log, debug.log (see logging section)
  LOGROOT: &logroot
      applog
      
  # Berkeley DB Log Archive directory. Backup offsite.
  ARCHIVEPATH:
      db_archive
      
  # Berkeley DB Hot Backup directory, for incremental backups and failover. Backup offsite.      
  HOTBACKUP:
      db_hotbackup

  # Cache for "map" interface for large image files
  TILEPATH:
      emen2tiles


# Raw data storage area. You may want to place this on a large raid array.
# You can also set this up to split file storage by date, e.g.:
    # 0: /raid1/
    # 20080501: /raid2/
    # 20100101: /raid3/
# Files from beginning -> May 2008 will be on /raid1, May 2008 to Jan 2010 on /raid2, and files after Jan 2010 on /raid3
# You will need to use an absolute path here
binaries:
   BINARYPATH:
      0: /home/emen2/emen2data
    

# Command to invoke to run EMAN2 tile generator for micrographs. These will be cached in the TILEPATH directory.
EMAN2:
   E2TILEFILE: emen2/clients/e2tilefile.py --buildspec


params:
  # Database version. This may be moved out of the config file at some point.
  VERSION: 20100325

  # Number of web server threads to run. Note: these are python threads, so limited to single CPU
  NUMTHREADS: 1
  
  # URI and port configuration.
  EMEN2EXTURI: http://localhost:8080
  EMEN2HOST: localhost
  EMEN2PORT: 8080

  # Web root is useful is you are proxying behind apache: e.g. /proxy/virtualroot/db -> /db... and external proxy port
  EMEN2WEBROOT: ""
  EMEN2EXTPORT: 8080

  # SSL
  EMEN2HTTPS: False
  EMEN2PORT_HTTPS: 65532
  
  # You will want to leave these at their default settings
  TIMESTR: '%Y/%m/%d %H:%M:%S'
  MAXRECURSE: 50
  BLOCKLENGTH: 100000
  MAXIDLE: 604800
  USETXN: True
  RECOVER: True


customization:
  # Short string for database identification. This shows up several places in the UI
  EMEN2DBNAME: "EMEN2"
  
  # Logo in emen2/tweb/images to use
  EMEN2LOGO: "emen2logo-small.png"
  
  # Default text to show on login screen
  GREETING: 
      <p>Welcome!</p>

  # Template to use for anonymous uses (e.g. before login)
  HOME_NOAUTH: '/pages/home.noauth'
  
  # Words to ignore in full-text indexing.
  UNINDEXED_WORDS: ["in", "of", "for", "this", "the", "at", "to", "from", "at", "for", "and", "it", "or"]

  # Default groups for new users
  GROUP_DEFAULTS: ["create"]
  
  # Unused at the moment
  SPARSETREE: 1


# Record IDs to use in the top toolbar in the web UI
bookmarks:
  BOOKMARKS:
    GROUPS: 1
    PROJECTS: 1
    EQUIPMENT: 1


# Set mailhost to 0 to leave mail subsystem off, otherwise set to outgoing SMTP server
mailsettings:
  MAILADMIN: root@localhost
  MAILHOST: 0




# Probably don't want to touch these unless you have an unusual Berkeley DB setup, e.g. db48_recover instead of db_recover
dbutils:
    prefix:
        - *bdbprefix
    db_recover: bin/db_recover
    db_hotbackup: bin/db_hotbackup
    db_archive: bin/db_archive
    db_checkpoint: bin/db_checkpoint
 
 
# Additional template and view directories to add to search paths 
viewsettings:
  TEMPLATEDIRS: 
    - 'templates'
  VIEWPATHS:
    - 'views'


# Logging files. See &logroot for base directory.
logging:
  prefix:
    - *logroot
  EMEN2ERRLOG: emen2errlog
  EMEN2JOBFILE: emen2job
  DEBUGLOG: debug.log
  DEBUG: True