Skip to content

Commit

Permalink
Getting Started: Improve OpenMediaVault usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lastzero committed Nov 3, 2024
1 parent 439a164 commit 3422608
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 19 deletions.
9 changes: 4 additions & 5 deletions docs/getting-started/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Alternatively, [Podman](https://podman.io/) is supported as a drop-in replacemen
-e PHOTOPRISM_ADMIN_PASSWORD="insecure" \
-v /photoprism/storage \
-v ~/Pictures:/photoprism/originals \
photoprism/photoprism
photoprism/photoprism:latest
```

=== "Podman"
Expand All @@ -41,7 +41,7 @@ Alternatively, [Podman](https://podman.io/) is supported as a drop-in replacemen
-e PHOTOPRISM_ADMIN_PASSWORD="insecure" \
-v /photoprism/storage \
-v ~/Pictures:/photoprism/originals \
photoprism/photoprism
photoprism/photoprism:latest
```

Please keep in mind to replace the `docker` command with `podman` when following the examples in our documentation.
Expand All @@ -66,7 +66,7 @@ Enabling [public mode](config-options.md) will disable authentication.
!!! info ""
It can be helpful to keep Docker running in the foreground while debugging
so that log messages are displayed directly. To do this, omit the `-d` parameter when restarting.

Should the server already be running, or you see no errors, you may have started it
on a different host and/or port. There could also be an [issue with your browser,
ad blocker, or firewall settings](troubleshooting/index.md#connection-fails).
Expand Down Expand Up @@ -203,8 +203,7 @@ Use the `--help` flag to see a detailed command description, for example:
docker exec -ti photoprism photoprism backup --help
```

PhotoPrism's command-line interface is also well suited for job automation using a
[scheduler](https://dl.photoprism.app/docker/scheduler/).
PhotoPrism's command-line interface is also well suited for job automation using a [scheduler](https://dl.photoprism.app/docker/scheduler/).

!!! tip ""
When using *Docker*, you can prepend commands like `docker exec -ti [container] [command]` to run them in a container. Should this fail with *no container found*, make sure the container has been started and you have specified an existing container name or id.
Expand Down
34 changes: 31 additions & 3 deletions docs/getting-started/nas/openmediavault.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,39 @@ PhotoPrism can be conveniently installed using the OpenMediaVault [plugin](https

## Getting Updates

To upgrade your instance, open a terminal, download our newest image from Docker Hub, and then restart the service:
To upgrade your instance, first connect to the server running OpenMediaVault via SSH or open a terminal from the web interface, then download the newest image from [Docker Hub](https://hub.docker.com/r/photoprism/photoprism/tags) and restart the service:

```bash
podman pull docker.io/photoprism/photoprism:latest
systemctl restart pod-photoprism.service
sudo podman pull docker.io/photoprism/photoprism:latest
sudo systemctl restart pod-photoprism.service
```

## Opening a Terminal

OpenMediaVault runs PhotoPrism as a containerized service with Podman, which means you can use the [`podman` command](../troubleshooting/docker.md#podman-compose) to open a terminal session.

To do this, first connect to the server running OpenMediaVault via SSH or open a terminal from the web interface and then check if PhotoPrism is running (and if so, under what name):

```bash
sudo podman ps
```

In the output, you should see PhotoPrism running under a name like `photoprism-app`, which you can specify to open a terminal session as follows:

```bash
sudo podman exec -ti photoprism-app /bin/bash
```

You should now be able to run terminal commands, such as those for [managing users](../../user-guide/users/cli.md). Running `photoprism help` will list all commands and [config options](../config-options.md) available in the current version:

```bash
photoprism help
```

Use the `--help` flag to see a detailed command description, for example:

```bash
photoprism backup --help
```

!!! example ""
Expand Down
44 changes: 33 additions & 11 deletions docs/getting-started/updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Open a terminal and change to the folder where your `compose.yaml` file is located.[^1]
Now run the following commands to download the newest image from [Docker Hub](https://hub.docker.com/r/photoprism/photoprism/tags) and restart your instance in the background:

```
```bash
docker compose pull
docker compose stop
docker compose up -d
Expand All @@ -28,7 +28,7 @@ We recommend that you compare your own `compose.yaml` with [our latest examples]

You can test [**upcoming features and enhancements**](https://link.photoprism.app/roadmap) by changing the `photoprism/photoprism` image tag from `:latest` to [`:preview`](https://hub.docker.com/r/photoprism/photoprism/tags?page=1&name=preview) and then running the following commands to download the newest image from [Docker Hub](https://hub.docker.com/r/photoprism/photoprism/tags) and restart your instance in the background:

```
```bash
docker compose pull
docker compose stop
docker compose up -d
Expand Down Expand Up @@ -66,22 +66,44 @@ When you have [changed the configuration](portainer/index.md) to your needs or j
### Pure Docker
Open a terminal on your server, and run the following command to pull the most recent container image:
Open a terminal or connect to your server via ssh, and then run the following command to download the [newest image](https://hub.docker.com/r/photoprism/photoprism/tags) (use the `:preview` tag to get the [preview build](#development-preview)):

```
```bash
docker pull photoprism/photoprism:latest
```

See [Running PhotoPrism with Docker](docker.md) for a command reference.
Then stop the `photoprism` service and [create a new instance](docker.md#step-1-start-the-server) as shown below:

```bash
docker stop photoprism
docker rm photoprism
docker run -d \
--name photoprism \
--security-opt seccomp=unconfined \
--security-opt apparmor=unconfined \
-p 2342:2342 \
-e PHOTOPRISM_UPLOAD_NSFW="true" \
-e PHOTOPRISM_ADMIN_PASSWORD="insecure" \
-v /photoprism/storage \
-v ~/Pictures:/photoprism/originals \
photoprism/photoprism:latest
```

[Learn more ›](docker.md)

!!! tldr ""
In order to simplify configuration and updates, we recommend using [Docker Compose](docker-compose.md) instead of [Docker](docker.md).

### OpenMediaVault

To upgrade your instance, open a terminal, download our newest image from Docker Hub, and then restart the service:
To upgrade your instance, first connect to the server running OpenMediaVault via SSH or open a terminal from the web interface, then download the newest image from [Docker Hub](https://hub.docker.com/r/photoprism/photoprism/tags) and restart the service:

```bash
sudo podman pull docker.io/photoprism/photoprism:latest
sudo systemctl restart pod-photoprism.service
```
podman pull docker.io/photoprism/photoprism:latest
systemctl restart pod-photoprism.service
```

[Learn more ›](nas/openmediavault.md)

### Complete Rescan

Expand All @@ -96,14 +118,14 @@ You can start a [rescan from the user interface](../user-guide/library/originals

Existing users may index faces without performing a complete rescan:

```
```bash
docker compose exec photoprism photoprism faces index
```

Remove existing people and faces for a clean start e.g. after upgrading from our
[development preview](https://docs.photoprism.app/release-notes/#development-preview):

```
```bash
docker compose exec photoprism photoprism faces reset -f
```

Expand Down

0 comments on commit 3422608

Please sign in to comment.