[global] # Application instance name app_name = lab # Either "production", "development" mode = production [server] # Protocol (http, https, socket) protocol = http # The ip address to bind to, "0.0.0.0" will bind to all interfaces http_addr = 0.0.0.0 # The http port to bind to http_port = 8080 # The domain name used to access lab domain = localhost # The full url used to access lab in browser root_url = %(protocol)s://%(domain)s:%(http_port)s/ # https certification and its key file cert_file = cert_key_file = # Unix socket path, for "socket" only unix_socket = # Static file root path (relative or absolute) static_root_path = public # Enable GZip enable_gzip = false # Set to true to log each request and execution times log_request = true [database] # Either "mysql", "postgres" or "sqlite3" type = mysql # Database connection configuration, for "mysql" and "postgres" host = 127.0.0.1:3306 name = lab user = root passwd = # For "postgres" only, Either "disable", "require" or "verify-full" ssl_mode = disable # For "sqlite3" only, absolute path of db file db_path = # Max idle connection number, default is 2 max_idle_conn = 2 # Max opened connection number, default is 0 (unlimited) max_open_conn = 0 # Max connection lifetime (seconds), default is 14400 (4 hours) conn_max_lifetime = 14400 # Set to true to log each sql statement and execution times log_query = false [log] # Either "console", "file", default is "console" # Use space to separate multiple modes, e.g. "console file" mode = console # Either "debug", "info", "warn", "error", default is "info" level = info # For "file" only, absolute path of log file log_path = /var/log/labapp/lab.log [uuid] # Uuid generator type, supports "internal" currently generator_type = internal # For "internal" only, each server must have unique id server_id = 0 [security] # Used for signing, you must change it to keep your user data safe before you first run lab secret_key = # Set to true to enable two factor authorization enable_two_factor = true # Token expired seconds, default is 604800 (7 days) token_expired_time = 604800 # Temporary token expired seconds, default is 300 (5 minutes) temporary_token_expired_time = 300 # Add X-Request-Id header to response to track user request or error, default is true request_id_header = true [user] # Set to true to allow users to register account by themselves enable_register = true