Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Path to the Plex config INI file (default: ~/.plexconfig.ini)
# PLEXADM_CONFIG=/path/to/.plexconfig.ini
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,3 +573,22 @@ bash scripts/mass_process.sh
## Naming Scheme

See [docs/naming-scheme.md](./docs/naming-scheme.md).

## Using a .env file

Rather than embedding credentials in your `docker-compose.yml`, you can store them in a `.env` file and bind-mount it into the container:

```bash
cp .env.example .env
# edit .env with your values
```

```yaml
services:
app:
image: ghcr.io/jasmeralia/plexscripts:latest
volumes:
- /path/to/your/.env:/app/.env:ro
```

The app loads `/app/.env` automatically on startup. Any value in `.env` can still be overridden by an explicit `environment:` entry in your Compose file.
4 changes: 4 additions & 0 deletions plexadm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
from dataclasses import dataclass
from pathlib import Path

from dotenv import load_dotenv

load_dotenv()


@dataclass(frozen=True)
class PlexConfig:
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
plexapi

pydantic-settings>=2.0