Improve docker setup

- add .dockerignore to reduce build context
- add entrypoint.sh to initialize environment before user switch
- fix Celery setting deprecation warnings
- downgrade importlib-metadata for Celery compatibility
- set TZ environment variable for consistent Celery timestamps
This commit is contained in:
Jan Dittberner 2023-02-20 15:59:08 +01:00
parent 2575afb9f9
commit 88253ee37d
7 changed files with 43 additions and 21 deletions

View file

@ -25,16 +25,16 @@ def get_env_setting(setting):
########## CELERY CONFIGURATION
CELERY_BROKER_URL = get_env_setting("GVAMYSQL_BROKER_URL")
CELERY_RESULT_BACKEND = get_env_setting("GVAMYSQL_RESULTS_REDIS_URL")
CELERY_RESULT_PERSISTENT = True
CELERY_TASK_RESULT_EXPIRES = None
CELERY_ROUTES = ("gvacommon.celeryrouters.GvaRouter",)
CELERY_TIMEZONE = "Europe/Berlin"
CELERY_ENABLE_UTC = True
CELERY_ACCEPT_CONTENT = ["json"]
CELERY_TASK_SERIALIZER = "json"
CELERY_RESULT_SERIALIZER = "json"
accept_content = ["json"]
broker_url = get_env_setting("GVAMYSQL_BROKER_URL")
enable_utc = True
result_backend = get_env_setting("GVAMYSQL_RESULTS_REDIS_URL")
result_expires = None
result_persistent = True
result_serializer = "json"
task_routes = ("gvacommon.celeryrouters.GvaRouter",)
task_serializer = "json"
timezone = "Europe/Berlin"
########## END CELERY CONFIGURATION
########## GVAMYSQL CONFIGURATION