Files
mcma-compose/.env.example
T
Senko-san e96dbaddbe chore: YTM source — mount cookies volume; bump mcma-backend + mcma-webui
docker-compose.yml mounts ./data/youtube on api+worker for an optional yt-dlp cookies.txt; .env.example documents YOUTUBE_COOKIES_PATH. Bumps the backend + webui submodules to the YTM search/download feature commits. (mcma-bootstrap stays untracked — separate repo.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-14 14:04:59 +03:00

67 lines
3.0 KiB
Bash

# ======================================================================
# mycoolmusicapp — combined env for docker compose (dev).
# Copy to .env: cp .env.example .env (or: make env)
# Compose injects this into api, worker and webui. Never commit real .env.
# Per-repo .env.example files still exist for running a service standalone.
# ======================================================================
# ---- Ports -----------------------------------------------------------
NGINX_PORT=8881 # main entrypoint (browser)
API_PORT=8000 # direct backend access (debug / docs)
WEBUI_PORT=3000 # rsbuild dev server (internal; proxied through nginx)
POSTGRES_PORT=5432
REDIS_PORT=6379
# ---- Postgres (db service) -------------------------------------------
POSTGRES_USER=mcma
POSTGRES_PASSWORD=mcma
POSTGRES_DB=mcma
# ---- Backend (api + worker) ------------------------------------------
ENVIRONMENT=dev # dev | test | prod
LOG_LEVEL=INFO
LOG_JSON=false # true in prod
# DATABASE_URL / REDIS_URL are overridden in compose to point at the db/redis
# services. These localhost values are the fallback for host-run processes.
DATABASE_URL=postgresql+asyncpg://mcma:mcma@localhost:5432/mcma
DB_ECHO=false
REDIS_URL=redis://localhost:6379/0
# auth — GENERATE a strong secret for prod: `openssl rand -hex 32`
JWT_SECRET=change-me-in-prod
ACCESS_TOKEN_TTL_SECONDS=900
REFRESH_TOKEN_TTL_SECONDS=2592000
# Public self-service sign-up (POST /auth/register). Set to false to make
# accounts admin-only. Backend authority; pair with PUBLIC_ENABLE_REGISTRATION.
ALLOW_REGISTRATION=true
# media / storage (paths inside the container)
MEDIA_PATH=/data/media
TRANSCODE_CACHE_PATH=/data/transcode-cache
MAX_PARALLEL_DOWNLOADS=2
# external services (all optional — backend degrades gracefully if unset)
# ML_SERVICE_URL=http://ml:9000
# Metadata enrichment (§1D): without a key, only embedded-tag enrichment runs;
# set it to enable AcoustID fingerprint → MusicBrainz identification.
# Get a free key at https://acoustid.org/new-application
ACOUSTID_API_KEY=
# Your contact email, sent to MusicBrainz/AcoustID as part of the User-Agent
# (required by their usage policy — apps without one get throttled).
MUSICBRAINZ_OWNER_EMAIL=
# YouTube Music source (search + download via yt-dlp). Enabled by default;
# set to false to hide it from /sources.
# YOUTUBE_ENABLED=true
# Optional yt-dlp cookies for age/region-restricted downloads. The host folder
# ./data/youtube is mounted at /data/youtube in api+worker; drop your exported
# cookies.txt there. Search and most downloads work without it — it's only used
# when the file is present, so leaving this set with no file is harmless.
YOUTUBE_COOKIES_PATH=/data/youtube/cookies.txt
# ---- Frontend (webui) ------------------------------------------------
# Served same-origin behind nginx, so the default '/api/v1' just works.
PUBLIC_API_BASE_URL=/api/v1
# Show the public sign-up UI. Keep in sync with ALLOW_REGISTRATION above.
PUBLIC_ENABLE_REGISTRATION=true