Skip to content

Commit

Permalink
Merge pull request #1386 from cvisionai/dev/fix_slow_docker_compose
Browse files Browse the repository at this point in the history
Dev/fix slow docker compose
  • Loading branch information
bctcvai authored Aug 22, 2023
2 parents bb90561 + 4b1cd49 commit 657f844
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ endif
# Set this ENV to http://iad-ad-1.clouds.archive.ubuntu.com/ubuntu/ for
# faster builds on Oracle OCI
APT_REPO_HOST ?= $(shell cat /etc/apt/sources.list | grep -E "focal main|jammy main" | grep -v cdrom | head -n1 | awk '{print $$2}')

ifeq ($(APT_REPO_HOST),)
APT_REPO_HOST=http://archive.ubuntu.com/ubuntu/
endif

#############################
## Help Rule + Generic targets
Expand Down
19 changes: 17 additions & 2 deletions api/tator_online/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
# Whether keycloak is being used for authentication
KEYCLOAK_ENABLED = os.getenv("KEYCLOAK_ENABLED") == "TRUE"

STATSD_ENABLED = os.getenv("STATSD_ENABLED", "TRUE") == "TRUE"
AUDIT_ENABLED = os.getenv("AUDIT_ENABLED", "TRUE") == "TRUE"

# Application definition

INSTALLED_APPS = [
Expand Down Expand Up @@ -89,9 +92,21 @@
"django.contrib.auth.middleware.AuthenticationMiddleware",
]
)
+ (
[
"tator_online.StatsdMiddleware",
]
if STATSD_ENABLED
else []
)
+ (
[
"tator_online.AuditMiddleware",
]
if AUDIT_ENABLED
else []
)
+ [
"tator_online.StatsdMiddleware",
"tator_online.AuditMiddleware",
"django.contrib.messages.middleware.MessageMiddleware",
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
Expand Down
4 changes: 4 additions & 0 deletions example-env
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@ USE_MIN_JS=true

# Whether this is a compose deployment (always true for OSS)
COMPOSE_DEPLOY=true

STATSD_ENABLED=false

AUDIT_ENABLED=false

0 comments on commit 657f844

Please sign in to comment.