Example config
mode: local
rabbitmq:
host: localhost
username: rm_user
password: rm_password
postgres:
host: localhost
port: 5500
username: pguser
password: pgpass
security:
allowed_hosts:
- "*"
- "account.service:8000"
- "account.service"
- "dockingjudge.tapeline.dev"
- "localhost"
- "127.0.0.1"
app:
allow_registration: true
Configuration reference
service_config_loader
module-attribute
service_config_loader = config_loader(
YamlSource("account_service.yml"),
EnvSource(prefix="ACCOUNT_SVC_", sep="__"),
config=Config,
)
PostgresConfig
dataclass
PostgresConfig(
host="localhost",
port=5503,
username="pguser",
password="pgpass",
database="account_db",
)
Postgres configuration.
RabbitMQConfig
dataclass
AppConfig
dataclass
SecurityConfig
dataclass
SecurityConfig(
allowed_hosts=(lambda: ["*"])(),
secret_key="django-insecure-e!dhn4o+qii7k+^sj&!2t(!1!su4=9ly#hh@h3$m06qhp&98$5",
)
Security configuration.
allowed_hosts
class-attribute
instance-attribute
allowed_hosts = field(default_factory=lambda: ['*'])