chore(): infrastructure improvements

This commit is contained in:
ITQ
2026-02-12 14:44:25 +03:00
parent 9181d2980a
commit cb9692089f
19 changed files with 134 additions and 270 deletions
+3 -7
View File
@@ -5,8 +5,8 @@ DJANGO_CSRF_TRUSTED_ORIGINS=http://localhost,http://127.0.0.1
DJANGO_CORS_ALLOWED_ORIGINS=*
DJANGO_INTERNAL_IPS=127.0.0.1
DJANGO_LANGUAGE_CODE=en-us
DJANGO_STATIC_URL=http://localhost:13241/
REDIS_URI=redis://valkey:6379
DJANGO_STATIC_URL=static/
REDIS_URI=redis://default:valkey@valkey:6379
DJANGO_DB_URI=postgresql://postgres:postgres@postgresql/postgres
DJANGO_CONN_MAX_AGE=300
DJANGO_SILKY_PYTHON_PROFILER=
@@ -16,8 +16,6 @@ DJANGO_SUPERUSER_USERNAME=admin
DJANGO_SUPERUSER_EMAIL=admin@mail.com
DJANGO_SUPERUSER_PASSWORD=admin
# Observability (OpenTelemetry)
OTEL_ENABLED=False
OTEL_SERVICE_NAME=backend-django
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
@@ -25,12 +23,10 @@ OTEL_TRACES_EXPORTER=otlp
OTEL_METRICS_EXPORTER=otlp
OTEL_LOGS_EXPORTER=otlp
# Storages (S3)
AWS_ACCESS_KEY_ID=access
AWS_SECRET_ACCESS_KEY=storage-secret
AWS_STORAGE_BUCKET_NAME=backend
AWS_S3_ENDPOINT_URL=s3:9000
AWS_S3_ENDPOINT_URL=http://s3:9000
AWS_S3_REGION_NAME=local
AWS_S3_USE_SSL=False
AWS_S3_VERIFY=False
+51
View File
@@ -0,0 +1,51 @@
{
log {
output stdout
format json
level INFO
}
}
:80 {
encode gzip zstd
handle_path /static/* {
uri strip_prefix /static
reverse_proxy backend-staticfiles:80 {
fail_duration 30s
max_fails 10
}
}
handle_path /grafana/* {
reverse_proxy grafana:3000 {
fail_duration 30s
max_fails 10
health_uri /grafana
health_interval 10s
health_timeout 2s
}
}
handle {
request_body {
max_size 5976883
}
reverse_proxy backend:8080 {
fail_duration 30s
max_fails 10
health_uri /ready
health_interval 10s
health_timeout 2s
}
}
}
:8404 {
metrics /metrics
log {
output discard
}
}
@@ -1 +1,3 @@
GF_SECURITY_ADMIN_PASSWORD=prooooood
GF_SERVER_ROOT_URL=http://localhost:80/grafana
GF_SERVER_SERVE_FROM_SUB_PATH=true
@@ -18,3 +18,7 @@ scrape_configs:
static_configs:
- targets:
- localhost:8429
- job_name: caddy
static_configs:
- targets:
- caddy:8404