File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,4 +29,14 @@ clean:
2929psql :
3030 ${CONTAINER_ENGINE} compose -f tools/docker/docker-compose.yaml exec postgres psql -U awx
3131
32- .PHONY : help sync test coverage lint fix compose clean psql
32+ pcompose :
33+ podman-compose -f tools/docker/docker-compose.yaml up
34+
35+ pclean :
36+ podman-compose -f tools/docker/docker-compose.yaml down -v
37+
38+ ppsql :
39+ podman-compose -f tools/docker/docker-compose.yaml exec postgres psql -U awx
40+
41+
42+ .PHONY : help sync test coverage lint fix compose clean psql pcompose pclean ppsql
Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ def prepare():
1919 mock_path = os .path .normpath (os .path .join (os .path .dirname (__file__ ), '..' , 'mock_awx' ))
2020 sys .path .append (mock_path )
2121
22+ db_env_vars = [key for key in os .environ if key .startswith ('METRICS_UTILITY_DB_' )]
23+ if spec is not None and db_env_vars :
24+ sys .stderr .write (
25+ f'Warning: { ", " .join (db_env_vars )} ignored because Automation Controller modules were found. '
26+ 'These only take effect in standalone mode.\n '
27+ )
28+
2229 import django
2330
2431 from awx import prepare_env
Original file line number Diff line number Diff line change 44DATABASES = {
55 'default' : {
66 'ENGINE' : 'django.db.backends.postgresql' ,
7- 'NAME' : ' awx' ,
8- 'USER' : ' myuser' ,
9- 'PASSWORD' : ' mypassword' ,
7+ 'NAME' : os . getenv ( 'METRICS_UTILITY_DB_NAME' , ' awx') ,
8+ 'USER' : os . getenv ( 'METRICS_UTILITY_DB_USER' , ' myuser') ,
9+ 'PASSWORD' : os . getenv ( 'METRICS_UTILITY_DB_PASSWORD' , ' mypassword') ,
1010 'HOST' : os .getenv ('METRICS_UTILITY_DB_HOST' , 'localhost' ),
11- 'PORT' : ' 5432' ,
11+ 'PORT' : os . getenv ( 'METRICS_UTILITY_DB_PORT' , ' 5432') ,
1212 },
1313 # metrics-service database — same Postgres instance, different DB name/credentials.
1414 # Override any of these via environment variables:
2626 'PORT' : os .getenv ('METRICS_SERVICE_DB_PORT' , '5432' ),
2727 },
2828}
29+
2930DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
3031INSTALLED_APPS = ['awx.conf' ]
3132LANGUAGE_CODE = 'en-us'
You can’t perform that action at this time.
0 commit comments