Files
mcma-compose/.env.example
T
Senko-san d6f5d7f057 chore: enable registration env + bump backend/webui submodules
Add ALLOW_REGISTRATION + PUBLIC_ENABLE_REGISTRATION (default true) to
.env.example and bump both submodules to the registration-flow commits.

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

59 lines
2.5 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=
# Sent to MusicBrainz/AcoustID — put a real contact so you don't get rate-limited.
MUSICBRAINZ_USER_AGENT=mcma-backend/0.1.0 ( https://github.com/your/repo )
# YOUTUBE_COOKIES_PATH=/data/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