feat: enhance Docker setup with environment variable management and add example docker-compose file
Some checks failed
Publish Docker Image / push_to_registry (push) Failing after 2m2s

This commit is contained in:
2025-07-02 20:37:03 +00:00
committed by GitHub
parent d4e858756a
commit 62fc5509b0
6 changed files with 100 additions and 25 deletions

View File

@@ -56,16 +56,30 @@ cp docker-compose.override.yml.example docker-compose.override.yml
All configuration is done through environment variables. If Navidrome server configuration is not provided via environment variables, the application will automatically prompt you to configure it within the client interface.
### Optional Variables
### Runtime Environment Variables (Docker)
- `NEXT_PUBLIC_NAVIDROME_URL`: URL of your Navidrome server (optional - app will prompt if not set)
- `NEXT_PUBLIC_NAVIDROME_USERNAME`: Navidrome username (optional - app will prompt if not set)
- `NEXT_PUBLIC_NAVIDROME_PASSWORD`: Navidrome password (optional - app will prompt if not set)
When running with Docker, use these variable names (without the `NEXT_PUBLIC_` prefix):
- `NAVIDROME_URL`: URL of your Navidrome server (optional - app will prompt if not set)
- `NAVIDROME_USERNAME`: Navidrome username (optional - app will prompt if not set)
- `NAVIDROME_PASSWORD`: Navidrome password (optional - app will prompt if not set)
- `PORT`: Port for the application to listen on (default: `3000`)
- `HOST_PORT`: Host port to map to container port (docker-compose only, default: `3000`)
- `POSTHOG_KEY`: PostHog analytics key (optional)
- `POSTHOG_HOST`: PostHog analytics host (optional)
### Development Environment Variables
For local development (non-Docker), use these variable names:
- `NEXT_PUBLIC_NAVIDROME_URL`: URL of your Navidrome server
- `NEXT_PUBLIC_NAVIDROME_USERNAME`: Navidrome username
- `NEXT_PUBLIC_NAVIDROME_PASSWORD`: Navidrome password
- `NEXT_PUBLIC_POSTHOG_KEY`: PostHog analytics key (optional)
- `NEXT_PUBLIC_POSTHOG_HOST`: PostHog analytics host (optional)
**Note**: Docker deployment uses a runtime replacement mechanism to inject environment variables, while development uses Next.js's built-in `NEXT_PUBLIC_` variables.
## Examples
### Basic Setup (App will prompt for configuration)