mirror of
https://github.com/ansible/awx.git
synced 2026-05-13 20:37:39 -02:30
Fix official image builds
I broke everything in https://github.com/ansible/awx/pull/11242. These changes were necessary in order to run `awx-manage collectstatic` without a running database.
This commit is contained in:
@@ -9,6 +9,7 @@ import copy
|
||||
import errno
|
||||
import sys
|
||||
import traceback
|
||||
import socket
|
||||
|
||||
# Django Split Settings
|
||||
from split_settings.tools import optional, include
|
||||
@@ -88,4 +89,8 @@ except IOError:
|
||||
|
||||
# The below runs AFTER all of the custom settings are imported.
|
||||
|
||||
DATABASES['default'].setdefault('OPTIONS', dict()).setdefault('application_name', f'{CLUSTER_HOST_ID}-{os.getpid()}-{" ".join(sys.argv)}'[:63]) # noqa
|
||||
CLUSTER_HOST_ID = socket.gethostname()
|
||||
|
||||
DATABASES.setdefault('default', dict()).setdefault('OPTIONS', dict()).setdefault(
|
||||
'application_name', f'{CLUSTER_HOST_ID}-{os.getpid()}-{" ".join(sys.argv)}'[:63]
|
||||
) # noqa
|
||||
|
||||
Reference in New Issue
Block a user