OpenSlides / openslides-manage-service

Manage service for OpenSlides 4+
MIT License
4 stars 12 forks source link

Unification + expansion of the environment variables #224

Closed peb-adr closed 1 year ago

peb-adr commented 1 year ago

General

One aim of this issue (and all mentioned ones) is to unify the env vars across the services and cleanup the default environment.

Instead of declaring differing DB connection credentials in separate per-service env vars, The default DB credentials should be overridden in the environment of the relevant service.

Also a need arised to give the possibility to set all secrets paths as absolute ones and independently from each other. So for all secrets an appropriate *_FILE variable containing the full absolute path should be introduced.

Issues with service-specific requirements are opened in the respective repos.

manage-service specific

For the manage-service specifically this means:

Please make the following changes to the environment variables:

Instead of having MANAGE_ACTION_HOST ACTION_HOST should be set for the manage service overriding the value from the default env.

In the default compose template MEDIA_BLOCK_SIZE should go from the defaultEnvironment to the media services own environment.

The defaultEnvironment should look like follow after changes in all services have been made.

  ACTION_HOST: backendAction
  ACTION_PORT: "9002"
  AUTH_HOST: auth
  AUTH_PORT: "9004"
  AUTOUPDATE_HOST: autoupdate
  AUTOUPDATE_PORT: "9012"
  CACHE_HOST: redis
  CACHE_PORT: "6379"
  DATASTORE_READER_HOST: datastoreReader
  DATASTORE_READER_PORT: "9010"
  DATASTORE_WRITER_HOST: datastoreWriter
  DATASTORE_WRITER_PORT: "9011"
  ICC_HOST: icc
  ICC_PORT: "9007"
  MANAGE_HOST: manage
  MANAGE_PORT: "9008"
  MEDIA_HOST: media
  MEDIA_PORT: "9006"
  MESSAGE_BUS_HOST: redis
  MESSAGE_BUS_PORT: "6379"
  PRESENTER_HOST: backendPresenter
  PRESENTER_PORT: "9003"
  VOTE_HOST: vote
  VOTE_PORT: "9013"
  OPENSLIDES_DEVELOPMENT: "false"
  OPENSLIDES_LOGLEVEL: info
  SYSTEM_URL: localhost:8000
  DATABASE_HOST: postgres
  DATABASE_NAME: openslides
  DATABASE_PORT: "5432"
  DATABASE_USER: openslides
  DATABASE_PASSWORD_FILE: /run/secrets/postgres_password
  AUTH_TOKEN_KEY_FILE: /run/secrets/auth_token_key
  AUTH_COOKIE_KEY_FILE: /run/secrets/auth_cookie_key
  INTERNAL_AUTH_PASSWORD_FILE: /run/secrets/internal_auth_password
  MANAGE_AUTH_PASSWORD_FILE: /run/secrets/manage_auth_password
jsangmeister commented 1 year ago

The variables VOTE_DATABASE_* and MEDIA_DATABASE_* will stay because the vote service needs both connections at once, which might differ. The media service will keep the variables for consistency with the vote service naming.

The localprod setup needs adjustments, too - I guess this will be done with this issue as well?

jsangmeister commented 1 year ago

localprod works with current main - I think this can just be closed