Improve docker setup
- add .dockerignore - add entrypoint.sh to switch to user after initial setup - downgrade importlib-metadata for Celery compatibility - add TZ environment variable for consistent Celery timestamps - fix Celery setting deprecation warnings
This commit is contained in:
parent
fc9723c401
commit
2c2a667d81
7 changed files with 50 additions and 28 deletions
|
|
@ -8,7 +8,7 @@ Common settings and globals.
|
|||
from os import environ
|
||||
|
||||
|
||||
def get_env_setting(setting):
|
||||
def get_env_variable(setting):
|
||||
"""
|
||||
Get the environment setting or return exception.
|
||||
|
||||
|
|
@ -25,20 +25,20 @@ def get_env_setting(setting):
|
|||
|
||||
|
||||
########## CELERY CONFIGURATION
|
||||
CELERY_TIMEZONE = "Europe/Berlin"
|
||||
CELERY_ENABLE_UTC = True
|
||||
CELERY_RESULT_PERSISTENT = True
|
||||
CELERY_TASK_RESULT_EXPIRES = None
|
||||
CELERY_ROUTES = ("gvacommon.celeryrouters.GvaRouter",)
|
||||
CELERY_ACCEPT_CONTENT = ["json"]
|
||||
CELERY_TASK_SERIALIZER = "json"
|
||||
CELERY_RESULT_SERIALIZER = "json"
|
||||
CELERY_RESULT_BACKEND = get_env_setting("GVAWEB_RESULTS_REDIS_URL")
|
||||
CELERY_BROKER_URL = get_env_setting("GVAWEB_BROKER_URL")
|
||||
accept_content = ["json"]
|
||||
broker_url = get_env_variable("GVAWEB_BROKER_URL")
|
||||
enable_utc = True
|
||||
result_backend = get_env_variable("GVAWEB_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
|
||||
|
||||
########## GVAWEB CONFIGURATION
|
||||
GVAWEB_NGINX_SITES_AVAILABLE = get_env_setting("GVAWEB_NGINX_SITES_AVAILABLE")
|
||||
GVAWEB_NGINX_SITES_ENABLED = get_env_setting("GVAWEB_NGINX_SITES_ENABLED")
|
||||
GVAWEB_WWWUSER_MOUNT = get_env_setting("GVAWEB_WWWUSER_MOUNT")
|
||||
GVAWEB_NGINX_SITES_AVAILABLE = get_env_variable("GVAWEB_NGINX_SITES_AVAILABLE")
|
||||
GVAWEB_NGINX_SITES_ENABLED = get_env_variable("GVAWEB_NGINX_SITES_ENABLED")
|
||||
GVAWEB_WWWUSER_MOUNT = get_env_variable("GVAWEB_WWWUSER_MOUNT")
|
||||
########## END GVAWEB CONFIGURATION
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue