-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: 백엔드 배포 환경 파일 통합 #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| # Decoded Backend — unified env file for Docker stack (api + ai + meilisearch + redis + searxng) | ||
| # Usage: cp .env.backend.example .env.backend.prod (or .env.backend.dev / .env.backend.staging) | ||
| # | ||
| # Docker Compose overrides internal service URLs automatically (MEILISEARCH_URL, REDIS_HOST, etc.) | ||
| # You only need to fill in external service credentials below. | ||
|
|
||
| # ─── Shared ─────────────────────────────────────────────── | ||
| API_SERVER_GRPC_PORT=50053 | ||
|
|
||
| # ─── API Server (Rust/Axum) ────────────────────────────── | ||
| ENV=production | ||
| HOST=0.0.0.0 | ||
| PORT=8000 | ||
| RUST_LOG=info | ||
| LOG_FORMAT=text | ||
| ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173 | ||
|
|
||
| # Database (Supabase PostgreSQL) | ||
| DATABASE_URL=postgresql://postgres:[PASSWORD]@[PROJECT-REF].supabase.co:5432/postgres | ||
| DB_MAX_CONNECTIONS=100 | ||
| DB_MIN_CONNECTIONS=5 | ||
| DB_CONNECT_TIMEOUT=30 | ||
| DB_IDLE_TIMEOUT=600 | ||
|
|
||
| # Supabase Auth | ||
| SUPABASE_URL=https://[PROJECT-REF].supabase.co | ||
| SUPABASE_ANON_KEY=eyJhbGc... | ||
| SUPABASE_SERVICE_ROLE_KEY=eyJhbGc... | ||
| SUPABASE_JWT_SECRET=your-jwt-secret | ||
|
|
||
| # Meilisearch | ||
| MEILISEARCH_URL=http://localhost:7700 | ||
| MEILISEARCH_MASTER_KEY=your-master-key | ||
|
|
||
| # Cloudflare R2 | ||
| R2_ACCOUNT_ID=your-account-id | ||
| R2_ACCESS_KEY_ID=your-access-key | ||
| R2_SECRET_ACCESS_KEY=your-secret-key | ||
| R2_BUCKET_NAME=decoded-images | ||
| R2_PUBLIC_URL=https://pub-xxxxx.r2.dev | ||
|
|
||
| # Affiliate | ||
| RAKUTEN_API_KEY=your-rakuten-key | ||
| RAKUTEN_PUBLISHER_ID=your-publisher-id | ||
|
|
||
| # AI Queue gRPC (API -> ai-server) | ||
| AI_SERVER_GRPC_URL=http://localhost:50052 | ||
|
|
||
| # Vector Search (OpenAI Embeddings) | ||
| OPENAI_API_KEY=sk-... | ||
| OPENAI_EMBEDDING_MODEL=text-embedding-3-small | ||
| OPENAI_EMBEDDING_DIMENSIONS=256 | ||
|
|
||
| # ─── AI Server (Python/gRPC) ───────────────────────────── | ||
| APP_ENV=prod | ||
|
|
||
| JWT_SECRET_KEY=your-jwt-secret-change-me | ||
| JWT_ALGORITHM=HS256 | ||
|
|
||
| LOG_LEVEL=INFO | ||
| # Note: LOG_FORMAT is set per-service in docker-compose (api=text, ai=json) | ||
|
|
||
| REDIS_HOST=localhost | ||
| REDIS_PORT=6379 | ||
| REDIS_PASSWORD=your-redis-password | ||
| REDIS_DB=0 | ||
|
|
||
| QUEUE_BATCH_SIZE=10 | ||
|
|
||
| API_SERVER_HTTP_URL=http://localhost:8000 | ||
| API_SERVER_ACCESS_TOKEN=your_backend_token | ||
|
|
||
| SELENIUM_URL=http://localhost:4444 | ||
|
|
||
| API_SERVER_GRPC_HOST=localhost | ||
|
|
||
| PERPLEXITY_API_KEY= | ||
| PERPLEXITY_API_URL=https://api.perplexity.ai | ||
| PERPLEXITY_MODEL=sonar | ||
| PERPLEXITY_MAX_RETRIES=3 | ||
| PERPLEXITY_REQUEST_TIMEOUT=30 | ||
|
|
||
| SEARXNG_API_URL=http://localhost:4000 | ||
| SEARXNG_MAX_RETRIES=3 | ||
| SEARXNG_REQUEST_TIMEOUT=10 | ||
|
|
||
| TELEGRAM_BOT_TOKEN= | ||
| TELEGRAM_CHAT_ID= | ||
| TELEGRAM_ENABLED=false | ||
|
|
||
| BATCH_SIZE=10 | ||
| MAX_CONCURRENT_REQUESTS=5 | ||
| REQUEST_TIMEOUT=30 | ||
| MAX_RETRIES=3 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Decoded backend: api + ai + Meilisearch + Redis + SearXNG (multi-container). | ||
| # From repo root: bash scripts/deploy-backend.sh dev up --build | ||
| # Requires packages/api-server/.env.dev + packages/ai-server/.dev.env | ||
| # Requires .env.backend.dev (repo root, unified) | ||
|
|
||
| name: decoded-backend | ||
|
|
||
|
|
@@ -14,10 +14,11 @@ services: | |
| ports: | ||
| - "8080:8080" | ||
| env_file: | ||
| - ../../.env.dev | ||
| - ../../../../.env.backend.dev | ||
| environment: | ||
| PORT: "8080" | ||
| HOST: "0.0.0.0" | ||
| LOG_FORMAT: text | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dev compose missing
|
||
| MEILISEARCH_URL: http://meilisearch:7700 | ||
| AI_SERVER_GRPC_URL: http://ai:50051 | ||
| API_SERVER_GRPC_PORT: "50052" | ||
|
|
@@ -44,16 +45,17 @@ services: | |
| expose: | ||
| - "50051" | ||
| env_file: | ||
| - ../../../ai-server/.dev.env | ||
| - ../../../../.env.backend.dev | ||
| environment: | ||
| LOG_FORMAT: json | ||
| REDIS_HOST: redis | ||
| REDIS_PORT: "6379" | ||
| SEARXNG_API_URL: http://searxng:8080 | ||
| API_SERVER_HTTP_URL: http://api:8080 | ||
| API_SERVER_GRPC_HOST: api | ||
| API_SERVER_GRPC_PORT: "50052" | ||
| AI_GRPC_LISTEN_PORT: "50051" | ||
| APP_ENV: prod | ||
| APP_ENV: dev | ||
| depends_on: | ||
| api: | ||
| condition: service_healthy | ||
|
|
@@ -98,7 +100,7 @@ services: | |
| networks: | ||
| - decoded-backend | ||
| env_file: | ||
| - ../../../ai-server/.dev.env | ||
| - ../../../../.env.backend.dev | ||
| command: | ||
| - /bin/sh | ||
| - -c | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stale env file path in Meilisearch error message
Medium Severity
The
MEILISEARCH_MASTER_KEYrequired-variable error message on line 86 still references the old pathpackages/api-server/.env.prod, but this PR moved the env file to.env.backend.prodat the repo root. The comment at line 4 of the same file was correctly updated to.env.backend.prod, so this is an inconsistent omission. WhenMEILISEARCH_MASTER_KEYis missing in prod, the error will direct the operator to a file that no longer exists.Reviewed by Cursor Bugbot for commit 6edc54c. Configure here.