Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,6 @@ services:
AWS_ENDPOINT_URL_S3: ${MINIO_ENDPOINT_URL}
SUPPORT_EMAIL_ADDRESS: ${SUPPORT_EMAIL_ADDRESS}
DJANGO_MIGRATE: 1
DD_TRACE_ENABLED: "false"
DD_TRACE_AGENT_URL: http://localhost:8126
DD_DOGSTATSD_URL: udp://localhost:8125
DD_SERVICE: app
DD_ENV: ${ENV}
DD_TAGS: app:${APP},env:{ENV}
DD_DJANGO_CACHE_SERVICE_NAME: django.core.cache
KILUIGI_INTERMEDIATETARGET_BACKEND_CLASS: ${KILUIGI_INTERMEDIATETARGET_BACKEND_CLASS}
KILUIGI_INTERMEDIATETARGET_ROOT_PATH: ${KILUIGI_INTERMEDIATETARGET_ROOT_PATH}
KILUIGI_FINALTARGET_BACKEND_CLASS: ${KILUIGI_FINALTARGET_BACKEND_CLASS}
Expand All @@ -134,7 +127,6 @@ services:
- db
environment:
<<: *base_env
DD_SERVICE: dagster_webserver
entrypoint: docker/app/run_dagster_webserver.sh
x-aws-role:
Statement:
Expand All @@ -160,7 +152,6 @@ services:
- db
environment:
<<: *base_env
DD_SERVICE: dagster_daemon
entrypoint: docker/app/run_dagster_daemon.sh
x-aws-role:
Statement:
Expand Down
5 changes: 0 additions & 5 deletions docker/app/gunicorn_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

env = environ.Env(
# set casting, default value
DD_TRACE_ENABLED=(bool, False),
GUNICORN_PORT=(int, 8000),
LOG_FORMATTER=(str, "standard"),
)
Expand All @@ -24,9 +23,6 @@
limit_request_line = 0
# Set the access_log_format and handlers according to whether we are logging to DataDog
access_handlers = ["logfile", "access_log"]
if env("DD_TRACE_ENABLED"):
access_handlers += ["console"]
statsd_host = env("DD_DOGSTATSD_URL").split("//")[1] # Gunicorn doesn't recognize the udp:// scheme
# Set the access_log_format according to whether we are using a log processor like FluentD or DataDog
if env("LOG_FORMATTER") == "json":
access_log_format = '{ "time_local":"%(t)s", "remote_addr":"%(h)s", "request":"%(U)s", "query":"%(q)s", "request_method":"%(m)s", "status":%(s)s, "body_bytes_sent":%(B)d, "request_time":%(D)d, "http_user_agent":"%(a)s", "http_referrer":"%(f)s", "x_forwarded_for": "%({X-Forwarded-For}i)s"}' # NOQA
Expand Down Expand Up @@ -87,7 +83,6 @@
"level": "DEBUG",
"propagate": False,
},
"ddtrace": {"level": "INFO", "propagate": False},
"environ": {"level": "INFO", "propagate": False},
"fiona": {"level": "INFO", "propagate": False},
"rasterio": {"level": "INFO", "propagate": False},
Expand Down
6 changes: 3 additions & 3 deletions docker/app/run_dagster_daemon.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Wait up to 30 minutes for outstanding migrations to finish running on another container, checking every 30 seconds
for i in `seq 1 60`; do
for i in $(seq 1 60); do
./manage.py migrate --plan | grep "No planned migration operations." && break
echo Waiting for outstanding database migrations
sleep 30
Expand All @@ -13,5 +13,5 @@ echo Setting up logs
touch log/django.log
chown -R django:django log/*

echo Starting Dagster with ddtrace to ${DD_TRACE_AGENT_URL}
gosu django ddtrace-run dagster-daemon run $*
echo Starting Dagster
gosu django dagster-daemon run $*
6 changes: 3 additions & 3 deletions docker/app/run_dagster_webserver.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Wait up to 30 minutes for outstanding migrations to finish running on another container, checking every 30 seconds
for i in `seq 1 60`; do
for i in $(seq 1 60); do
./manage.py migrate --plan | grep "No planned migration operations." && break
echo Waiting for outstanding database migrations
sleep 30
Expand All @@ -13,5 +13,5 @@ echo Setting up logs
touch log/django.log
chown -R django:django log/*

echo Starting Dagster with ddtrace to ${DD_TRACE_AGENT_URL}
gosu django ddtrace-run dagster-webserver -h 0.0.0.0 -p 3000 -m pipelines --path-prefix /${DAGSTER_WEBSERVER_PREFIX} $*
echo Starting Dagster
gosu django dagster-webserver -h 0.0.0.0 -p 3000 -m pipelines --path-prefix /${DAGSTER_WEBSERVER_PREFIX} $*
4 changes: 2 additions & 2 deletions docker/app/run_django.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ touch log/django.log
touch log/django_sql.log
chown -R django:django log/*

echo Starting Gunicorn with DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE} and ddtrace to ${DD_TRACE_AGENT_URL}
gosu django ddtrace-run gunicorn ${APP}.wsgi:application \
echo Starting Gunicorn with DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
gosu django gunicorn ${APP}.wsgi:application \
--name ${APP}${ENV} \
--config $(dirname $(readlink -f "$0"))/gunicorn_config.py \
$* 2>&1
1 change: 0 additions & 1 deletion env.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ MINIO_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
MINIO_ENDPOINT_URL=http://minio:9000 # change to http://localhost:9000 if using a local environment
SUPPORT_EMAIL_ADDRESS=helpdesk@fews.net
PIP_INDEX_URL=https://pypi.python.org/simple/
DD_TRACE_ENABLED=False

# Google API related settings
# GOOGLE_APPLICATION_CREDENTIALS = '{
Expand Down
2 changes: 0 additions & 2 deletions hea/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
"django.contrib.admindocs",
"binary_database_files",
"django_extensions",
"ddtrace.contrib.django",
"rest_framework_gis",
]
PROJECT_APPS = ["common", "metadata", "baseline"]
Expand Down Expand Up @@ -259,7 +258,6 @@
},
},
"loggers": {
"ddtrace": {"handlers": ["logfile"], "level": "INFO"},
"django.request": {"handlers": ["console", "logfile"], "level": "INFO", "propagate": False},
"django.db.backends": {"handlers": ["console", "logfile"], "level": "INFO", "propagate": False},
"django.security": {"handlers": ["console", "logfile"], "level": "ERROR", "propagate": False},
Expand Down
1 change: 0 additions & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ dagster_aws==0.22.8
dagster-pipes==1.6.8
dagster-postgres==0.22.8
dagster-webserver==1.6.8
ddtrace==2.6.2
Django==5.1.4
django-binary-database-files==1.0.18
django-environ==0.11.2
Expand Down