82 lines
3.1 KiB
Bash
82 lines
3.1 KiB
Bash
# Copy to .env for your LOCAL synthetic test environment; never commit .env.
|
|
# These are logical interface suggestions; map actual framework names in REPORT.md.
|
|
# Host process (make run); the container binds 0.0.0.0 in Dockerfile.
|
|
APP_HOST=127.0.0.1
|
|
APP_PORT=8080
|
|
APP_ENV=lab
|
|
SESSION_TTL_SECONDS=3600
|
|
# Choose credentials locally. File paths contain no secret values.
|
|
DATABASE_URL_FILE=/run/secrets/database_url
|
|
# Optional on 3, required use on 4 in lab2; Redis OR Valkey:
|
|
SESSION_STORE=postgres
|
|
CACHE_URL_FILE=/run/secrets/cache_url
|
|
API_REPLICAS=2
|
|
IDEMPOTENCY_TTL_SECONDS=86400
|
|
# Lab 4 logical names (skeleton). Containers get S3_ENDPOINT from compose.yaml,
|
|
# make run overrides it with 127.0.0.1:S3_HOST_PORT; keys come from the lines below.
|
|
S3_ENDPOINT=http://s3:9000
|
|
S3_REGION=us-east-1
|
|
S3_BUCKET=messenger-attachments
|
|
S3_ACCESS_KEY_ID_FILE=/run/secrets/s3_access_key_id
|
|
S3_SECRET_ACCESS_KEY_FILE=/run/secrets/s3_secret_access_key
|
|
MAX_UPLOAD_BYTES=10485760
|
|
MAX_IMAGE_PIXELS=40000000
|
|
# Lab 5 logical names (skeleton). BROKER_URL_FILE is not used: relay and worker
|
|
# get BROKER_HOST/BROKER_PASSWORD from compose.yaml (REPORT.md, «Конфигурация»).
|
|
BROKER_URL_FILE=/run/secrets/broker_url
|
|
WORKER_CONCURRENCY=2
|
|
JOB_MAX_ATTEMPTS=5
|
|
JOB_TIMEOUT_SECONDS=60
|
|
STAGING_RETENTION_SECONDS=86400
|
|
# Lab 6 names (skeleton). service.name is fixed by each entry point
|
|
# (messenger-api, messenger-worker, messenger-relay), so OTEL_SERVICE_NAME is
|
|
# not read; compose.yaml points api, worker and relay at the Collector by name.
|
|
# Only deployment.environment.name is accepted in OTEL_RESOURCE_ATTRIBUTES.
|
|
# make run sets OTEL_SDK_DISABLED=true for host processes.
|
|
OTEL_SERVICE_NAME=messenger-api
|
|
# Worker must set a distinct service.name.
|
|
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
|
|
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
|
|
OTEL_RESOURCE_ATTRIBUTES=deployment.environment.name=lab
|
|
|
|
# Compose and make run. make env fills the empty passwords and keys locally.
|
|
HOST_PORT=8080
|
|
POSTGRES_USER=messenger
|
|
POSTGRES_DB=messenger
|
|
POSTGRES_PASSWORD=
|
|
POSTGRES_HOST_PORT=5433
|
|
VALKEY_PASSWORD=
|
|
VALKEY_HOST_PORT=6380
|
|
LOG_LEVEL=INFO
|
|
SHUTDOWN_TIMEOUT=5
|
|
# S3 (SeaweedFS): the root pair and the signing key stay with the s3 server;
|
|
# api, worker and cleaner have their own users created by s3-bootstrap.
|
|
S3_HOST_PORT=8334
|
|
S3_ROOT_ACCESS_KEY=
|
|
S3_ROOT_SECRET_KEY=
|
|
S3_JWT_SIGNING_KEY=
|
|
S3_API_ACCESS_KEY=
|
|
S3_API_SECRET_KEY=
|
|
S3_WORKER_ACCESS_KEY=
|
|
S3_WORKER_SECRET_KEY=
|
|
S3_CLEANER_ACCESS_KEY=
|
|
S3_CLEANER_SECRET_KEY=
|
|
# RabbitMQ (lab 5): only relay and worker get the password.
|
|
BROKER_PASSWORD=
|
|
BROKER_HOST_PORT=5673
|
|
WORKER_PREFETCH=2
|
|
RENDER_MEMORY_MB=768
|
|
UPLOAD_MAX_UNFINISHED=300
|
|
# Observability (lab 6): Grafana on 127.0.0.1, admin password generated by
|
|
# make env. Telemetry knobs (defaults = full telemetry; track 1 changes them):
|
|
# OTEL_SDK_DISABLED=true switches the SDK off in api, worker and relay;
|
|
# OTEL_TRACES_SAMPLER_ARG is the share of root traces kept (0..1);
|
|
# OTEL_METRIC_EXPORT_INTERVAL is in ms; TELEMETRY_HISTOGRAM_BUCKETS is
|
|
# default or coarse.
|
|
GRAFANA_HOST_PORT=3180
|
|
GRAFANA_ADMIN_PASSWORD=
|
|
OTEL_SDK_DISABLED=false
|
|
OTEL_TRACES_SAMPLER_ARG=1.0
|
|
OTEL_METRIC_EXPORT_INTERVAL=15000
|
|
TELEMETRY_HISTOGRAM_BUCKETS=default
|