# -------------------------------------------------------------------------- 'name': env('APP_NAME', 'Appstub App'), 'main': 'acme.appstub', 'debug': env('DEBUG', False), # -------------------------------------------------------------------------- # Uvicorn Development Server # # Configure the dev server when you run `./uvicore http serve` # Dev server only, in production use gunicorn or uvicorn manually # -------------------------------------------------------------------------- 'server': { 'app': 'acme.appstub.http.server:http', 'host': env('SERVER_HOST', '127.0.0.1'), 'port': env.int('SERVER_PORT', 5000), 'reload': env.bool('SERVER_RELOAD', True), 'access_log': env.bool('SERVER_ACCESS_LOG', True), }, # -------------------------------------------------------------------------- # Web HTTP Server # # Web endpoint specific configuration and middleware. # Middleware is fully defined from the running application only. Packages # Do not define their own middleware as the running app should dictate all. # -------------------------------------------------------------------------- 'web': { 'prefix': '',
'api': { 'prefix': '/auth', }, # -------------------------------------------------------------------------- # Database Connections # -------------------------------------------------------------------------- 'database': { 'default': 'auth', 'connections': { 'auth': { 'backend': env('DB_AUTH_BACKEND', 'sqlalchemy'), 'driver': env('DB_AUTH_DRIVER', 'mysql'), 'dialect': env('DB_AUTH_DIALECT', 'pymysql'), 'host': env('DB_AUTH_HOST', '127.0.0.1'), 'port': env.int('DB_AUTH_PORT', 3306), 'database': env('DB_AUTH_DB', 'auth'), 'username': env('DB_AUTH_USER', 'root'), 'password': env('DB_AUTH_PASSWORD', 'techie'), 'prefix': env('DB_AUTH_PREFIX', None), }, }, }, # -------------------------------------------------------------------------- # Registration Control # -------------------------------------------------------------------------- # This lets you control the service provider registrations. If this app # is used as a package inside another app you might not want some things # registered in that context. # 'registers': {
env('APP_NAME', 'Wiki App'), 'main': 'mreschke.wiki', 'debug': env('DEBUG', False), # -------------------------------------------------------------------------- # Uvicorn Development Server # # Configure the dev server when you run `./uvicore http serve` # Dev server only, in production use gunicorn or uvicorn manually # -------------------------------------------------------------------------- 'server': { 'app': 'mreschke.wiki.http.server:http', 'host': env('SERVER_HOST', '127.0.0.1'), 'port': env.int('SERVER_PORT', 5000), 'reload': env.bool('SERVER_RELOAD', True), 'access_log': env.bool('SERVER_ACCESS_LOG', True), }, # -------------------------------------------------------------------------- # Web HTTP Server # # Web endpoint specific configuration and middleware. # Middleware is fully defined from the running application only. Packages # Do not define their own middleware as the running app should dictate all. # -------------------------------------------------------------------------- 'web': { 'prefix': env('WEB_PREFIX', ''),
'database': { 'default': env('DATABASE_DEFAULT', 'appstub'), 'connections': { # SQLite Example # 'appstub': { # 'driver': 'sqlite', # 'database': ':memory', # 'prefix': None, # }, # MySQL Example 'appstub': { 'driver': env('DB_APPSTUB_DRIVER', 'mysql'), 'dialect': env('DB_APPSTUB_DIALECT', 'pymysql'), 'host': env('DB_APPSTUB_HOST', '127.0.0.1'), 'port': env.int('DB_APPSTUB_PORT', 3306), 'database': env('DB_APPSTUB_DB', 'appstub'), 'username': env('DB_APPSTUB_USER', 'root'), 'password': env('DB_APPSTUB_PASSWORD', 'techie'), 'prefix': env('DB_APPSTUB_PREFIX', None), }, # Example of ORM over Remote Uvicore API # 'appstub': { # 'driver': 'api', # 'dialect': 'uvicore', # 'url': 'https://appstub.example.com/api', # 'prefix': None # }, }, },
'App1', 'main': 'app1', 'debug': True, # -------------------------------------------------------------------------- # Uvicorn Development Server # # Configure the dev server when you run `./uvicore http serve` # Dev server only, in production use gunicorn or uvicorn manually # -------------------------------------------------------------------------- 'server': { 'app': 'app1.http.server:http', 'host': env('SERVER_HOST', '0.0.0.0'), 'port': env.int('SERVER_PORT', 5000), 'reload': env.bool('SERVER_RELOAD', True), 'access_log': env.bool('SERVER_ACCESS_LOG', True), }, # -------------------------------------------------------------------------- # Web HTTP Server # # Web endpoint specific configuration and middleware # Middleware is fully defined from the running application only. Packages # Do not define their own middleware as the running app should dictate all. # -------------------------------------------------------------------------- 'web': { 'prefix': '',
'api': { 'prefix': '', }, # -------------------------------------------------------------------------- # Database Connections # -------------------------------------------------------------------------- 'database': { 'default': 'wiki', 'connections': { 'wiki': { 'driver': env('DB_WIKI_DRIVER', 'mysql'), 'dialect': env('DB_WIKI_DIALECT', 'pymysql'), 'host': env('DB_WIKI_HOST', '127.0.0.1'), 'port': env.int('DB_WIKI_PORT', 3306), 'database': env('DB_WIKI_DB', 'wiki'), 'username': env('DB_WIKI_USER', 'root'), 'password': env('DB_WIKI_PASSWORD', 'techie'), 'prefix': env('DB_WIKI_PREFIX', None), }, }, }, # -------------------------------------------------------------------------- # Redis Connections # -------------------------------------------------------------------------- 'redis': { 'default': env('REDIS_DEFAULT', 'wiki'), 'connections': {
# -------------------------------------------------------------------------- 'name': env('APP_NAME', 'Appstub App'), 'main': 'acme.appstub', 'debug': env('DEBUG', False), # -------------------------------------------------------------------------- # Uvicorn Development Server # # Configure the dev server when you run `./uvicore http serve` # Dev server only, in production use gunicorn or uvicorn manually # -------------------------------------------------------------------------- 'server': { 'app': 'acme.appstub.http.server:http', 'host': env('SERVER_HOST', '127.0.0.1'), 'port': env.int('SERVER_PORT', 5000), 'reload': env.bool('SERVER_RELOAD', True), 'access_log': env.bool('SERVER_ACCESS_LOG', True), }, # -------------------------------------------------------------------------- # Web HTTP Server # # Web endpoint specific configuration and middleware. # Middleware is fully defined from the running application only. Packages # Do not define their own middleware as the running app should dictate all. # -------------------------------------------------------------------------- 'web': { # URL prefix for all Web endpoints 'prefix': env('WEB_PREFIX', ''),
# Example of overriding the uvicore.auth package config to adjust # the auth database connection and prefix config = { # -------------------------------------------------------------------------- # Database Connections # -------------------------------------------------------------------------- 'database': { 'connections': { # SQLite Example # 'auth': { # 'driver': 'sqlite', # 'database': ':memory', # 'prefix': 'auth_', # }, # MySQL Example 'auth': { 'driver': 'mysql', 'dialect': 'pymysql', 'host': env('MYSQL_AUTH_HOST', '127.0.0.1'), 'port': env.int('MYSQL_AUTH_PORT', 3306), 'database': env('MYSQL_AUTH_DB', 'appstub'), 'username': env('MYSQL_AUTH_USER', 'root'), 'password': env('MYSQL_AUTH_PASSWORD', 'techie'), 'prefix': env('MYSQL_AUTH_PREFIX', 'auth_'), }, }, }, }
# -------------------------------------------------------------------------- 'name': 'App1', 'main': 'app1', 'debug': True, # -------------------------------------------------------------------------- # Uvicorn Development Server # # Configure the dev server when you run `./uvicore http serve` # Dev server only, in production use gunicorn or uvicorn manually # -------------------------------------------------------------------------- 'server': { 'app': 'app1.http.server:http', 'host': env('SERVER_HOST', '0.0.0.0'), 'port': env.int('SERVER_PORT', 5000), 'reload': env.bool('SERVER_RELOAD', True), 'access_log': env.bool('SERVER_ACCESS_LOG', True), }, # -------------------------------------------------------------------------- # Web HTTP Server # # Web endpoint specific configuration and middleware # Middleware is fully defined from the running application only. Packages # Do not define their own middleware as the running app should dictate all. # -------------------------------------------------------------------------- 'web': { 'prefix': '',