Skip to content

Commit 6a52b5f

Browse files
author
maxim-lixakov
committed
[DOP-19992] - split settings into ServerAppSettings & WorkerAppSettings & SchedulerSettings & add corresponding configuration documentation
1 parent dfd715b commit 6a52b5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+186
-122
lines changed

.env.docker

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ SYNCMASTER__DATABASE__URL=postgresql+asyncpg://syncmaster:changeme@db:5432/syncm
2525

2626
# TODO: add to KeycloakAuthProvider documentation about creating new realms, add users, etc.
2727
# KEYCLOAK Auth
28-
SYNCMASTER__AUTH__SERVER_URL=http://keycloak:8080
29-
SYNCMASTER__AUTH__REALM_NAME=manually_created
30-
SYNCMASTER__AUTH__CLIENT_ID=manually_created
31-
SYNCMASTER__AUTH__CLIENT_SECRET=generated_by_keycloak
28+
SYNCMASTER__AUTH__SERVER_URL=https://isso-dev.mts.ru/auth/
29+
SYNCMASTER__AUTH__REALM_NAME=mts
30+
SYNCMASTER__AUTH__CLIENT_ID=syncmaster_dev
31+
SYNCMASTER__AUTH__CLIENT_SECRET=Hg50UcBsxxHPyKNaYJFblb8ScdnnxWgC
3232
SYNCMASTER__AUTH__REDIRECT_URI=http://localhost:8000/v1/auth/callback
3333
SYNCMASTER__AUTH__SCOPE=email
3434
SYNCMASTER__AUTH__VERIFY_SSL=False
@@ -37,6 +37,7 @@ SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.keycloak_provider.K
3737
# Dummy Auth
3838
SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.dummy_provider.DummyAuthProvider
3939
SYNCMASTER__AUTH__ACCESS_TOKEN__SECRET_KEY=secret
40+
SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.keycloak_provider.KeycloakAuthProvider
4041

4142
# RabbitMQ
4243
SYNCMASTER__BROKER__URL=amqp://guest:guest@rabbitmq:5672/

docs/backend/configuration/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ Configuration
1818
static_files
1919
openapi
2020

21-
.. autopydantic_settings:: syncmaster.settings.Settings
22-
.. autopydantic_settings:: syncmaster.settings.server.ServerSettings
21+
.. autopydantic_settings:: syncmaster.backend.settings.ServerAppSettings
22+
.. autopydantic_settings:: syncmaster.backend.settings.server.ServerSettings

docs/index.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,22 @@
2020
backend/openapi
2121
backend/configuration/index
2222

23+
24+
.. toctree::
25+
:maxdepth: 2
26+
:caption: Worker
27+
:hidden:
28+
29+
worker/configuration/index
30+
31+
32+
.. toctree::
33+
:maxdepth: 2
34+
:caption: Scheduler
35+
:hidden:
36+
37+
scheduler/configuration/index
38+
2339
.. toctree::
2440
:maxdepth: 2
2541
:caption: Development
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _backend-configuration-broker:
2+
3+
Broker settings
4+
=================
5+
6+
.. autopydantic_model:: syncmaster.settings.broker.RabbitMQSettings
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _backend-configuration-database:
2+
3+
Database settings
4+
=================
5+
6+
.. autopydantic_model:: syncmaster.settings.database.DatabaseSettings
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.. _scheduler-configuration:
2+
3+
Configuration
4+
=============
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
:caption: Configuration
9+
:hidden:
10+
11+
database
12+
broker
13+
logging
14+
15+
.. autopydantic_settings:: syncmaster.scheduler.settings.SchedulerAppSettings
16+
.. autopydantic_settings:: syncmaster.scheduler.settings.SchedulerSettings
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.. _backend-configuration-logging:
2+
3+
Logging settings
4+
================
5+
6+
7+
.. autopydantic_model:: syncmaster.settings.log.LoggingSettings
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _backend-configuration-broker:
2+
3+
Broker settings
4+
=================
5+
6+
.. autopydantic_model:: syncmaster.settings.broker.RabbitMQSettings
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. _backend-configuration-database:
2+
3+
Database settings
4+
=================
5+
6+
.. autopydantic_model:: syncmaster.settings.database.DatabaseSettings
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.. _worker-configuration:
2+
3+
Configuration
4+
=============
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
:caption: Configuration
9+
:hidden:
10+
11+
database
12+
broker
13+
logging
14+
15+
.. autopydantic_settings:: syncmaster.worker.settings.WorkerAppSettings
16+
.. autopydantic_settings:: syncmaster.worker.settings.WorkerSettings

0 commit comments

Comments
 (0)