Merge branch 'staging' into to-blank-state
This commit is contained in:
commit
f7c1d403c7
@ -30,7 +30,7 @@ commands:
|
|||||||
default: atat_test
|
default: atat_test
|
||||||
container_env:
|
container_env:
|
||||||
type: string
|
type: string
|
||||||
default: -e PGHOST=postgres -e REDIS_URI=redis://redis:6379
|
default: -e PGHOST=postgres -e REDIS_HOST=redis:6379
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- run:
|
||||||
name: Set up temporary docker network
|
name: Set up temporary docker network
|
||||||
@ -172,7 +172,7 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
docker run \
|
docker run \
|
||||||
-e PGHOST=postgres \
|
-e PGHOST=postgres \
|
||||||
-e REDIS_URI=redis://redis:6379 \
|
-e REDIS_HOST=redis:6379 \
|
||||||
--network atat \
|
--network atat \
|
||||||
atat:builder \
|
atat:builder \
|
||||||
/bin/sh -c "pipenv install --dev && /bin/sh script/cibuild"
|
/bin/sh -c "pipenv install --dev && /bin/sh script/cibuild"
|
||||||
@ -195,7 +195,7 @@ jobs:
|
|||||||
docker run -d \
|
docker run -d \
|
||||||
-e DISABLE_CRL_CHECK=true \
|
-e DISABLE_CRL_CHECK=true \
|
||||||
-e PGHOST=postgres \
|
-e PGHOST=postgres \
|
||||||
-e REDIS_URI=redis://redis:6379 \
|
-e REDIS_HOST=redis:6379 \
|
||||||
-p 8000:8000 \
|
-p 8000:8000 \
|
||||||
--network atat \
|
--network atat \
|
||||||
--name test-atat \
|
--name test-atat \
|
||||||
@ -253,7 +253,7 @@ jobs:
|
|||||||
command: |
|
command: |
|
||||||
docker run \
|
docker run \
|
||||||
-e PGHOST=postgres \
|
-e PGHOST=postgres \
|
||||||
-e REDIS_URI=redis://redis:6379 \
|
-e REDIS_HOST=redis:6379 \
|
||||||
--network atat \
|
--network atat \
|
||||||
atat:builder \
|
atat:builder \
|
||||||
/bin/sh -c "pipenv install --dev && /bin/sh script/sync-crls && pipenv run pytest --no-cov tests/check_crl_parse.py"
|
/bin/sh -c "pipenv install --dev && /bin/sh script/sync-crls && pipenv run pytest --no-cov tests/check_crl_parse.py"
|
||||||
|
26
atst/app.py
26
atst/app.py
@ -223,20 +223,24 @@ def make_config(direct_config=None):
|
|||||||
config.read_dict({"default": direct_config})
|
config.read_dict({"default": direct_config})
|
||||||
|
|
||||||
# Assemble DATABASE_URI value
|
# Assemble DATABASE_URI value
|
||||||
database_uri = (
|
database_uri = "postgres://{}:{}@{}:{}/{}".format( # pragma: allowlist secret
|
||||||
"postgres://"
|
config.get("default", "PGUSER"),
|
||||||
+ config.get("default", "PGUSER")
|
config.get("default", "PGPASSWORD"),
|
||||||
+ ":"
|
config.get("default", "PGHOST"),
|
||||||
+ config.get("default", "PGPASSWORD")
|
config.get("default", "PGPORT"),
|
||||||
+ "@"
|
config.get("default", "PGDATABASE"),
|
||||||
+ config.get("default", "PGHOST")
|
|
||||||
+ ":"
|
|
||||||
+ config.get("default", "PGPORT")
|
|
||||||
+ "/"
|
|
||||||
+ config.get("default", "PGDATABASE")
|
|
||||||
)
|
)
|
||||||
config.set("default", "DATABASE_URI", database_uri)
|
config.set("default", "DATABASE_URI", database_uri)
|
||||||
|
|
||||||
|
# Assemble REDIS_URI value
|
||||||
|
redis_uri = "redis{}://{}:{}@{}".format( # pragma: allowlist secret
|
||||||
|
("s" if config["default"].getboolean("REDIS_TLS") else ""),
|
||||||
|
(config.get("default", "REDIS_USER") or ""),
|
||||||
|
(config.get("default", "REDIS_PASSWORD") or ""),
|
||||||
|
config.get("default", "REDIS_HOST"),
|
||||||
|
)
|
||||||
|
config.set("default", "REDIS_URI", redis_uri)
|
||||||
|
|
||||||
return map_config(config)
|
return map_config(config)
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,7 +24,10 @@ PGSSLMODE = prefer
|
|||||||
PGSSLROOTCERT
|
PGSSLROOTCERT
|
||||||
PGUSER = postgres
|
PGUSER = postgres
|
||||||
PORT=8000
|
PORT=8000
|
||||||
REDIS_URI = redis://localhost:6379
|
REDIS_HOST=localhost:6379
|
||||||
|
REDIS_PASSWORD
|
||||||
|
REDIS_TLS=False
|
||||||
|
REDIS_USER
|
||||||
SECRET_KEY = change_me_into_something_secret
|
SECRET_KEY = change_me_into_something_secret
|
||||||
SERVER_NAME
|
SERVER_NAME
|
||||||
SESSION_COOKIE_NAME=atat
|
SESSION_COOKIE_NAME=atat
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
[default]
|
[default]
|
||||||
DEBUG = true
|
|
||||||
PGHOST = postgreshost
|
|
||||||
PGDATABASE = atat_test
|
|
||||||
REDIS_URI = redis://redishost:6379
|
|
||||||
CRL_STORAGE_CONTAINER = tests/fixtures/crl
|
CRL_STORAGE_CONTAINER = tests/fixtures/crl
|
||||||
WTF_CSRF_ENABLED = false
|
|
||||||
CSP=mock-test
|
CSP=mock-test
|
||||||
|
DEBUG = true
|
||||||
|
PGDATABASE = atat_test
|
||||||
|
WTF_CSRF_ENABLED = false
|
||||||
|
@ -7,14 +7,16 @@ metadata:
|
|||||||
data:
|
data:
|
||||||
ASSETS_URL: https://atat-cdn.azureedge.net/
|
ASSETS_URL: https://atat-cdn.azureedge.net/
|
||||||
BLOB_STORAGE_URL: https://atat.blob.core.windows.net/
|
BLOB_STORAGE_URL: https://atat.blob.core.windows.net/
|
||||||
CELERY_DEFAULT_QUEUE: celery-master
|
|
||||||
CDN_ORIGIN: https://azure.atat.code.mil
|
CDN_ORIGIN: https://azure.atat.code.mil
|
||||||
|
CELERY_DEFAULT_QUEUE: celery-master
|
||||||
CSP: azure
|
CSP: azure
|
||||||
FLASK_ENV: master
|
FLASK_ENV: master
|
||||||
LOG_JSON: "true"
|
LOG_JSON: "true"
|
||||||
OVERRIDE_CONFIG_FULLPATH: /opt/atat/atst/atst-overrides.ini
|
OVERRIDE_CONFIG_FULLPATH: /opt/atat/atst/atst-overrides.ini
|
||||||
PGSSLMODE: verify-full
|
PGSSLMODE: verify-full
|
||||||
PGSSLROOTCERT: /opt/atat/atst/ssl/pgsslrootcert.crt
|
PGSSLROOTCERT: /opt/atat/atst/ssl/pgsslrootcert.crt
|
||||||
|
REDIS_HOST: atat.redis.cache.windows.net:6380
|
||||||
|
REDIS_TLS: "true"
|
||||||
STATIC_URL: https://atat-cdn.azureedge.net/static/
|
STATIC_URL: https://atat-cdn.azureedge.net/static/
|
||||||
TZ: UTC
|
TZ: UTC
|
||||||
UWSGI_CONFIG_FULLPATH: /opt/atat/atst/uwsgi.ini
|
UWSGI_CONFIG_FULLPATH: /opt/atat/atst/uwsgi.ini
|
||||||
|
Loading…
x
Reference in New Issue
Block a user