Updated the Obsidian docs-vault

This commit is contained in:
Mohammed Abad committed 2026-04-22 14:48:43 +01:00
1 parent 72fd77ee01
commit 260282a0e2
36 files changed
+3497 -144

No files matched your search

+116 -9
View File
@@ -1,16 +1,123 @@
# Environment Variables
---
title: Environment & Configuration
tags:
- configuration
- environment
- settings
aliases:
- Environment Variables
- Configuration
---
## Overview
# Environment & Configuration
Configuration is managed via `backend/settings.json` (see `settings.json.example`).
## Backend — `settings.json`
## Key Settings
The primary configuration file. Located at `backend/settings.json`. See `settings.json.example` for template.
- `tmdbApiKey` — TMDB API key for metadata fetching
- `backPort` — Backend server port
- Database connection configured in `backend/config/database.js`
| Field | Type | Default | Description |
|---|---|---|---|
| `userDataPath` | string | `C:\Users\{user}\Documents\Showy Data` | Root path for [[Media System\|media storage]] |
| `tmdbApiUrl` | string | `https://api.themoviedb.org/3` | [[TMDB Integration]] base URL |
| `tmdbApiKey` | string | — | TMDB API key (**required**) |
| `backPort` | number | `4000` | Backend server port |
| `frontPort` | string | `8000` | Frontend port (reference only) |
| `portableMode` | string | `""` | Portable mode path (empty = disabled) |
| `libraryViewMode` | string | `"grid"` | Library page view mode |
| `watchlistViewMode` | string | `"grid"` | Watchlist page view mode |
### Example
```json
{
"userDataPath": "C:\\Users\\username\\Documents\\Showy Data",
"tmdbApiUrl": "https://api.themoviedb.org/3",
"tmdbApiKey": "your_tmdb_api_key_here",
"frontPort": "8000",
"backPort": 4000,
"portableMode": "",
"libraryViewMode": "grid",
"watchlistViewMode": "grid"
}
```
## Database Configuration
> [!info] File: `backend/config/database.js`
| Setting | Value |
|---|---|
| Dialect | MySQL |
| Database | `Showzy` |
| Host | `localhost` |
| Username | `root` |
| Password | `password` |
| Logging | `sequelize.log` file |
## Docker Environment Variables
Used in `docker-compose.yml` — override database connection:
| Variable | Default | Description |
|---|---|---|
| `MYSQL_HOST` | `mysql` | MySQL host (Docker service name) |
| `MYSQL_DB` | `Showzy` | Database name |
| `MYSQL_USER` | `root` | Database user |
| `MYSQL_PASSWORD` | `password` | Database password |
| `MYSQL_ROOT_PASSWORD` | `rootpassword` | MySQL root password (init) |
## Frontend Environment
| Variable | Source | Description |
|---|---|---|
| `VITE_API_URL` | `.env` or build arg | API base URL override |
Vite dev proxy: `/api` → `http://showyback.coolguy.space` (configured in `vite.config.ts`)
## Electron Environment
| Variable | Set By | Description |
|---|---|---|
| `PARENT_PROCESS` | Electron main process | Electron user data path — signals backend it's running inside Electron |
## Media Folder Structure
Created automatically by `configService` on startup at `{userDataPath}`:
```
{userDataPath}/
├── images/
│ ├── entries/
│ │ ├── posters/
│ │ ├── backdrops/
│ │ └── logos/
│ ├── collections/
│ │ ├── posters/
│ │ └── backdrops/
│ ├── seasons/
│ │ └── posters/
│ ├── episodes/
│ │ └── stills/
│ └── peoples/
│ └── profiles/
└── showy.log
```
## Important Files
- `backend/settings.json.example` — Template
- `backend/config/database.js` — DB connection config
| File | Role |
|---|---|
| `backend/settings.json` | Runtime configuration |
| `backend/settings.json.example` | Template |
| `backend/config/database.js` | Database connection |
| `backend/services/configService.js` | Config reader/writer |
| `docker-compose.yml` | Docker env vars |
| `react_frontend/vite.config.ts` | Frontend dev proxy |
## See Also
- [[Backend]] — Server setup
- [[Deployment]] — Docker configuration
- [[TMDB Integration]] — API key usage
- [[Media System]] — Storage paths
- [[Settings Page]] — UI for editing settings