Dockingjudge docs

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.

host class-attribute instance-attribute

host = 'localhost'

port class-attribute instance-attribute

port = 5503

username class-attribute instance-attribute

username = 'pguser'

password class-attribute instance-attribute

password = 'pgpass'

database class-attribute instance-attribute

database = 'account_db'

RabbitMQConfig dataclass

RabbitMQConfig(
    host="localhost", port=5672, username="rm_user", password="rm_password"
)

RMQ configuration.

host class-attribute instance-attribute

host = 'localhost'

port class-attribute instance-attribute

port = 5672

username class-attribute instance-attribute

username = 'rm_user'

password class-attribute instance-attribute

password = 'rm_password'

AppConfig dataclass

AppConfig(allow_registration=True)

App configuration.

allow_registration class-attribute instance-attribute

allow_registration = True

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: ['*'])

secret_key class-attribute instance-attribute

secret_key = (
    "django-insecure-e!dhn4o+qii7k+^sj&!2t(!1!su4=9ly#hh@h3$m06qhp&98$5"
)

Config dataclass

Config(postgres, rabbit, security, app, mode='local')

Main configuration.

postgres instance-attribute

postgres

rabbit instance-attribute

rabbit

security instance-attribute

security

app instance-attribute

app

mode class-attribute instance-attribute

mode = 'local'
search