Skip to content

Commit

Permalink
Merge pull request #393 from ptr727/develop
Browse files Browse the repository at this point in the history
readme
  • Loading branch information
ptr727 authored Jun 21, 2024
2 parents 57a2ae5 + d0d3531 commit bd562ba
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
2 changes: 2 additions & 0 deletions PlexCleaner.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
],
"settings": {
"cSpell.words": [
"adduser",
"adpcm",
"aencode",
"aencoder",
Expand Down Expand Up @@ -77,6 +78,7 @@
"Muxing",
"Nerdbank",
"Newtonsoft",
"nonroot",
"NONSTRICT",
"nostats",
"NVENC",
Expand Down
47 changes: 35 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,23 @@ Alternatively, install directly on [Windows](#windows), [Linux](#linux), or [Mac

Example, run in an interactive shell:

```text
```console
# The host "/data/media" directory is mapped to the container "/media" directory
# Replace the volume mappings to suit your needs

# Make sure the media file permissions allow writing for the executing user
# adduser --no-create-home --shell /bin/false --disabled-password --system --group users nonroot
# Replace the user account to suit your needs
sudo chown -R nonroot:users /data/media
sudo chmod -R ugo=rwx /data/media

# Run the bash shell in an interactive session
docker run \
-it \
--rm \
--pull always \
--name PlexCleaner \
--user nonroot:users \
--volume /data/media:/media:rw \
docker.io/ptr727/plexcleaner \
/bin/bash
Expand All @@ -160,25 +167,42 @@ exit

Example, run in a screen session:

```text
```console
# Start a new screen session
screen
# Or attach to the existing screen session
# screen -rd

# Or attach to an existing screen session
screen -r
# Run the monitor command in an interactive session
docker run \
-it \
--rm \
--log-driver json-file --log-opt max-size=10m \
--pull always \
--name PlexCleaner \
--user nonroot:users \
--env TZ=America/Los_Angeles \
--volume /data/media:/media:rw \
docker.io/ptr727/plexcleaner \
/PlexCleaner/PlexCleaner \
--logfile /media/PlexCleaner/PlexCleaner.log \
--logwarning \
monitor \
--settingsfile /media/PlexCleaner/PlexCleaner.json \
--parallel \
--mediafiles /media/Movies \
--mediafiles /media/Series
```

# Make sure the media file permissions allow writing
sudo chown -R nobody:users /data/media
sudo chmod -R u=rwx,g=rwx+s,o=rx /data/media
Example, run as a command:

# Run the process command in an interactive session
```console
# Run the process command
docker run \
-it \
--rm \
--pull always \
--log-driver json-file --log-opt max-size=10m \
--name PlexCleaner \
--user nobody:users \
--user nonroot:users \
--env TZ=America/Los_Angeles \
--volume /data/media:/media:rw \
docker.io/ptr727/plexcleaner \
Expand All @@ -187,7 +211,6 @@ docker run \
--logwarning \
process \
--settingsfile /media/PlexCleaner/PlexCleaner.json \
--parallel \
--mediafiles /media/Movies \
--mediafiles /media/Series
```
Expand Down

0 comments on commit bd562ba

Please sign in to comment.