nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests

config.py.tmpl (682B)


      1 """0x0 Flask configuration"""
      2 
      3 import os
      4 
      5 # Local config variables
      6 appdir                     = "/usr/src/app/0x0"
      7 datadir                    = f"{appdir}/data"
      8 
      9 # The path to the sqlite database on the fhost
     10 SQLALCHEMY_DATABASE_URI    = f"sqlite:///{datadir}/sqlite.db"
     11 
     12 # Relative path to file storage on the fhost
     13 FHOST_STORAGE_PATH         = "data/files"
     14 
     15 # Backend and proxy are different containers,
     16 # files are only available on fhost
     17 FHOST_USE_X_ACCEL_REDIRECT = False 
     18 
     19 # Generate the external url with url_for (returned to the user)
     20 # https://flask.palletsprojects.com/en/latest/config/#SERVER_NAME
     21 SERVER_NAME = "{{ with nomadVar "nomad/jobs/0x0" }}{{ .host }}{{ end }}"