Skip to content

Commit 416b19a

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

File tree

60 files changed

+264
-141
lines changed

Some content is hidden

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

60 files changed

+264
-141
lines changed

.env.docker

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYNCMASTER__LOGGING__SETUP=True
99
SYNCMASTER__LOGGING__PRESET=colored
1010

1111
# Encrypt / Decrypt credentials data
12-
SYNCMASTER__CRYPTO_KEY=UBgPTioFrtH2unlC4XFDiGf5sYfzbdSf_VgiUSaQc94=
12+
SYNCMASTER__ENCRYPTION__CRYPTO_KEY=UBgPTioFrtH2unlC4XFDiGf5sYfzbdSf_VgiUSaQc94=
1313

1414
# Worker settings
1515
SYNCMASTER__WORKER__LOG_URL_TEMPLATE=https://grafana.example.com?correlation_id={{ correlation_id }}&run_id={{ run.id }}

.env.local

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ export SYNCMASTER__SCHEDULER__TRANSFER_FETCHING_TIMEOUT_SECONDS=200
1818
export SYNCMASTER__SERVER__SESSION__SECRET_KEY=session_secret_key
1919

2020
# Encrypt / Decrypt credentials data
21-
export SYNCMASTER__CRYPTO_KEY=UBgPTioFrtH2unlC4XFDiGf5sYfzbdSf_VgiUSaQc94=
21+
export SYNCMASTER__ENCRYPTION__CRYPTO_KEY=UBgPTioFrtH2unlC4XFDiGf5sYfzbdSf_VgiUSaQc94=
2222

2323
# Postgres
2424
export SYNCMASTER__DATABASE__URL=postgresql+asyncpg://syncmaster:changeme@localhost:5432/syncmaster
2525

2626
# Keycloack Auth
27-
export SYNCMASTER__AUTH__SERVER_URL=http://keycloak:8080
28-
export SYNCMASTER__AUTH__REALM_NAME=manually_created
29-
export SYNCMASTER__AUTH__CLIENT_ID=manually_created
30-
export SYNCMASTER__AUTH__CLIENT_SECRET=generated_by_keycloak
31-
export SYNCMASTER__AUTH__REDIRECT_URI=http://localhost:8000/auth/callback
32-
export SYNCMASTER__AUTH__SCOPE=email
33-
export SYNCMASTER__AUTH__VERIFY_SSL=False
27+
export SYNCMASTER__AUTH__KEYCLOAK__SERVER_URL=http://keycloak:8080
28+
export SYNCMASTER__AUTH__KEYCLOAK__REALM_NAME=manually_created
29+
export SYNCMASTER__AUTH__KEYCLOAK__CLIENT_ID=manually_created
30+
export SYNCMASTER__AUTH__KEYCLOAK__CLIENT_SECRET=generated_by_keycloak
31+
export SYNCMASTER__AUTH__KEYCLOAK__REDIRECT_URI=http://localhost:8000/auth/callback
32+
export SYNCMASTER__AUTH__KEYCLOAK__SCOPE=email
33+
export SYNCMASTER__AUTH__KEYCLOAK__VERIFY_SSL=False
3434
export SYNCMASTER__AUTH__PROVIDER=syncmaster.backend.providers.auth.keycloak_provider.KeycloakAuthProvider
3535

3636
# Dummy Auth

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

0 commit comments

Comments
 (0)