Skip to content

Commit

Permalink
Config: Mention "compose.yaml" in addition to "docker-compose.yml"
Browse files Browse the repository at this point in the history
  • Loading branch information
lastzero committed Sep 30, 2024
1 parent 4c26ecf commit 5ee5bd0
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions docs/developer-guide/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ In the build environment, the default login is `admin` with the password `photop
./photoprism --public start
```

You can find the default settings in [the docker-compose.yml file](https://github.com/photoprism/photoprism/blob/develop/docker-compose.yml) located in the root of the project. Keep them when [you run tests](tests.md). Otherwise, the tests may fail for others, even if they [succeed in your local environment](code-quality.md#test-automation-guidelines).
You can find the default settings in [the `compose.yaml` or `docker-compose.yml` file](https://github.com/photoprism/photoprism/blob/develop/docker-compose.yml) located in the root of the project. Keep them when [you run tests](tests.md). Otherwise, the tests may fail for others, even if they [succeed in your local environment](code-quality.md#test-automation-guidelines).

!!! example ""
You can find a list of all `make` targets in the [Makefile](https://github.com/photoprism/photoprism/blob/develop/Makefile).
Expand Down Expand Up @@ -146,7 +146,7 @@ Once the debugger is running, you can view the app at `http://localhost:2342/` a

* Radomir Sohlich wrote a [pragmatic introduction to Makefiles](https://sohlich.github.io/post/go_makefile/) for Go developers
* we are using [Go Modules](https://github.com/golang/go/wiki/Modules) for managing our dependencies (new in 1.11)
* this guide was not tested on Windows, you might need to change docker-compose.yml to make it work with Windows specific paths
* this guide was not tested on Windows, you might need to edit your `compose.yaml` or `docker-compose.yml` to make it work with Windows specific paths

### Apple Silicon, Raspberry Pi, and ARM64

Expand Down
4 changes: 2 additions & 2 deletions docs/developer-guide/technologies/yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ services:

## Docker Compose ##

When using [Docker Compose](https://docs.docker.com/compose/compose-file/compose-file-v3/), some additional rules apply, as `docker-compose.yml` files extend the YAML format with features such as [variable interpolation](https://docs.docker.com/compose/compose-file/12-interpolation/#interpolation).
When using [Docker Compose](https://docs.docker.com/compose/compose-file/compose-file-v3/), some additional rules apply, as `compose.yaml` or `docker-compose.yml` files extend the YAML format with features such as [variable interpolation](https://docs.docker.com/compose/compose-file/12-interpolation/#interpolation).

### Dollar Signs ###

If a configuration value [in a `docker-compose.yml` file](../../getting-started/docker-compose.md) contains a literal `$` character, for example in a password, you must use `$$` (a double dollar sign) to escape it so that e.g. `"compo$e"` becomes `"compo$$e"`:
If a configuration value [in a `compose.yaml` or `docker-compose.yml` file](../../getting-started/docker-compose.md) contains a literal `$` character, for example in a password, you must use `$$` (a double dollar sign) to escape it so that e.g. `"compo$e"` becomes `"compo$$e"`:

```yaml
services:
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/advanced/docker-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Even though [PhotoPrism](https://github.com/photoprism/photoprism) is [developed in Go](https://go.dev/) and therefore does not use many of the C libraries installed in our Docker image, external file converters like Darktable and FFmpeg as well as other tools installed as dependencies might use them. They may also be directly affected by [recently discovered vulnerabilities](https://ubuntu.com/security/cves) for which updates are available.

To automatically install these updates when the container starts for the first time, you can add `PHOTOPRISM_INIT: "update"` to the `environment` section of the `photoprism` service in your `docker-compose.yml`:
To automatically install these updates when the container starts for the first time, you can add `PHOTOPRISM_INIT: "update"` to the `environment` section of the `photoprism` service in your `compose.yaml` or `docker-compose.yml`:

```yaml
services:
Expand All @@ -32,7 +32,7 @@ We also recommend making sure that the latest Docker version and security update

## Run Services as Non-Root User

It is recommended that you run the `photoprism` service as a non-root user by setting either the `user` [service property](https://docs.docker.com/compose/compose-file/05-services/#user) or the `PHOTOPRISM_UID` and `PHOTOPRISM_GID` [environment variable](../config-options.md#docker-image) in your `docker-compose.yml` file:
It is recommended that you run the `photoprism` service as a non-root user by setting either the `user` [service property](https://docs.docker.com/compose/compose-file/05-services/#user) or the `PHOTOPRISM_UID` and `PHOTOPRISM_GID` [environment variable](../config-options.md#docker-image) in your `compose.yaml` or `docker-compose.yml` file:

| Environment | Default | Description |
|--------------------------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/advanced/docker-volumes.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ volumes:

SQLite, config, cache, backup, thumbnail and sidecar files are saved in the *storage* folder:

- a *storage* folder mount must always be configured in your `docker-compose.yml` file so that you do not lose these files after a restart or upgrade
- a *storage* folder mount must always be configured in your `compose.yaml` or `docker-compose.yml` file so that you do not lose these files after a restart or upgrade
- never configure the *storage* folder to be inside the *originals* folder unless the name starts with a `.` to indicate that it is hidden
- we recommend placing the *storage* folder on a [local SSD drive](../troubleshooting/performance.md#storage) for best performance
- mounting [symbolic links](https://en.wikipedia.org/wiki/Symbolic_link) or using them inside the *storage* folder is currently not supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
- Add the port to the MariaDB service
- On the **host** now run `sudo mysql2sqlite -f <PATH_TO_STORAGE_MOUNT>/storage/index.db -d photoprism -u root --mysql-password 'insecure'`
- Shutdown your current stack fully: `docker compose down`
- Edit your `docker-compose.yml`:
- Edit your `compose.yaml` or `docker-compose.yml`:
- Remove the MariaDB service.
- Change in the Photoprism settings to use the sqlite driver and remove the other database settings
- Start your stack again with `docker compose up -d`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- Stop Photoprism: `docker compose stop photoprism`
- On the **host** now run `sudo sqlite3mysql -f <PATH_TO_STORAGE_MOUNT>/storage/index.db -d photoprism -u root -p` and enter the MariaDB password when prompted (default is `insecure`).
- Shutdown your current stack again: `docker compose down`
- Edit your `docker-compose.yml` so it uses the MariaDB database you added before. Don't forget to remove the `ports`
- Edit your `compose.yaml` or `docker-compose.yml` so it uses the MariaDB database you added before. Don't forget to remove the `ports`
section of the MariaDB Container.
- Start your stack again with `docker compose up -d`
- If this worked you may want to delete the file `index.db` in the `storage` mount since it contains out of date
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/advanced/transcoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## AVC Encoders

The encoder used by FFmpeg can be configured with [`PHOTOPRISM_FFMPEG_ENCODER`](../config-options.md#file-conversion) in your `docker-compose.yml` config file:
The encoder used by FFmpeg can be configured with [`PHOTOPRISM_FFMPEG_ENCODER`](../config-options.md#file-conversion) in your `compose.yaml` or `docker-compose.yml` config file:

| Encoder | Value |
|----------------------------|-------------|
Expand Down Expand Up @@ -93,7 +93,7 @@ services:
- ...
```

In addition, you can choose to run the `photoprism` service as a non-root user by setting either the `user` [service property](https://docs.docker.com/compose/compose-file/05-services/#user) or the `PHOTOPRISM_UID` and `PHOTOPRISM_GID` [environment variables](../config-options.md#docker-image) in your `docker-compose.yml` file:
In addition, you can choose to run the `photoprism` service as a non-root user by setting either the `user` [service property](https://docs.docker.com/compose/compose-file/05-services/#user) or the `PHOTOPRISM_UID` and `PHOTOPRISM_GID` [environment variables](../config-options.md#docker-image) in your `compose.yaml` or `docker-compose.yml` file:

| Environment | Default | Description |
|----------------|---------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
Expand Down
12 changes: 6 additions & 6 deletions docs/getting-started/docker-compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Alternatively, [Podman Compose](troubleshooting/docker.md#podman-compose) is sup

Commands on Linux may have to be prefixed with `sudo` when not running as root.
Note that this will point the home directory shortcut `~` to `/root` in the `volumes:`
section of your `docker-compose.yml`. Kernel security modules such as AppArmor and SELinux
section of your config file. Kernel security modules such as AppArmor and SELinux
have been [reported to cause issues](troubleshooting/docker.md#kernel-security).

We recommend that your server has [at least 4 GB of swap](troubleshooting/docker.md#adding-swap) configured and to avoid setting a [hard memory limit](faq.md#why-is-my-configured-memory-limit-exceeded-when-indexing-even-though-photoprism-doesnt-actually-seem-to-use-that-much-memory), as this can lead to unexpected restarts when the indexer temporarily needs more memory to process large files. Indexing [RAW images and high-resolution panoramas](troubleshooting/performance.md#memory) may require additional [swap space](troubleshooting/docker.md#adding-swap) and/or physical memory beyond the [recommended minimum](index.md#system-requirements).
Expand Down Expand Up @@ -112,7 +112,7 @@ Alternatively, [Podman Compose](troubleshooting/docker.md#podman-compose) is sup
Indexing [RAW images and high-resolution panoramas](troubleshooting/performance.md#memory) may require additional [swap space](troubleshooting/docker.md#adding-swap) and/or physical memory beyond the [recommended minimum](index.md#system-requirements).

!!! note ""
When editing your `compose.yaml` or `docker-compose.yml` file, please make sure that [related values remain on the same indentation level](../developer-guide/technologies/yaml.md) and that [lists start with a dash](../developer-guide/technologies/yaml.md#multiple-values).
When editing YAML files, please make sure that [related values remain on the same indentation level](../developer-guide/technologies/yaml.md) and that [lists start with a dash](../developer-guide/technologies/yaml.md#multiple-values).
If the value of an environment variable contains a literal `$` sign, for example in a password, it [must be escaped](../developer-guide/technologies/yaml.md#dollar-signs) with `$$` (a double dollar sign) so that e.g. `"compo$e"` becomes `"compo$$e"`.

!!! danger ""
Expand Down Expand Up @@ -208,7 +208,7 @@ services:

### Step 2: Start the server

Open a terminal and change to the folder in which your `compose.yaml` or `docker-compose.yml` file has been saved.[^1]
Open a terminal and change to the folder in which your config file has been saved.[^1]
Run this command to start the application and database services in the background:

```bash
Expand Down Expand Up @@ -311,7 +311,7 @@ PhotoPrism's command-line interface is also well suited for job automation using

!!! tip ""
When using *Docker Compose*, you can prefix the commands you want to run with `docker compose exec [service]` to execute them in the specified service container.
If this fails with *no container found*, please make sure that the service has been started, you have specified an existing service (usually `photoprism`) and you are in the folder where your `compose.yaml` or `docker-compose.yml` file is located.
If this fails with *no container found*, please make sure that the service has been started, you have specified an existing service (usually `photoprism`) and you are in the folder where your config file is located.

#### Opening a Terminal

Expand All @@ -336,7 +336,7 @@ Note, however, that commands that you run without an explicit user ID might be e
The currently supported user ID ranges are 0, 33, 50-99, 500-600, 900-1250, and 2000-2100.

!!! tip ""
We recommend running the `photoprism` service as a non-root user by setting either the [user service property](https://docs.docker.com/compose/compose-file/05-services/#user) or the `PHOTOPRISM_UID` [environment variable](config-options.md#docker-image) in your `compose.yaml` or `docker-compose.yml` file. Don't forget to update file permissions and/or ownership with the `chown` command when you make changes.
We recommend running the `photoprism` service as a non-root user by setting either the [user service property](https://docs.docker.com/compose/compose-file/05-services/#user) or the `PHOTOPRISM_UID` [environment variable](config-options.md#docker-image) in your config file. Don't forget to update file permissions and/or ownership with the `chown` command when you make changes.

#### Examples

Expand Down Expand Up @@ -389,4 +389,4 @@ The currently supported user ID ranges are 0, 33, 50-99, 500-600, 900-1250, and
*[filesystem]: contains your files and folders
*[RHEL]: Red Hat Enterprise Linux®

[^1]: The default filename for the [Docker Compose](https://docs.docker.com/compose/) configuration is `docker-compose.yml`. For simplicity, it does not need to be specified if you run commands in the same directory. Config files for other apps and instances should be placed in separate folders.
[^1]: The default name for [Docker Compose](https://docs.docker.com/compose/) config files is `compose.yaml` or `docker-compose.yml`. For simplicity, it does not need to be specified if you run commands in the same directory. Config files for other apps and instances should be placed in separate folders.
2 changes: 1 addition & 1 deletion docs/getting-started/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Other [free and open-source software](https://en.wikipedia.org/wiki/Free_and_ope

### How can I activate my membership?

To connect a new instance to your membership account, you will need to log in with the super admin user that is automatically created during setup (see your `docker-compose.yml` file or the app store documentation), and then follow the steps described in our activation guide.
To connect a new instance to your membership account, you will need to log in with the super admin user that is automatically created during setup (see your `compose.yaml` or `docker-compose.yml` file or the app store documentation), and then follow the steps described in our activation guide.

[View Activation Guide ›](https://www.photoprism.app/kb/activation)

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/ports/freebsd.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Running PhotoPrism On FreeBSD

!!! danger ""
Please note that third-party apps may not provide access to the docker-compose.yml file or the command line, and therefore you may not be able to use all of PhotoPrism's features and config options.
Please note that third-party apps may not provide access to the `compose.yaml` or `docker-compose.yml` file or the command line, and therefore you may not be able to use all of PhotoPrism's features and config options.

!!! tldr ""
Should you experience problems with the installation, we recommend that you ask the FreeBSD community for advice, as we cannot provide support for third-party software and services. You can contribute by clicking :material-file-edit-outline: to send a pull request with your changes.
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/troubleshooting/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ sudo docker compose up -d
```

Note that this will point the home directory shortcut `~` to `/root` in the `volumes:` section
of your `docker-compose.yml`.
of your `compose.yaml` or `docker-compose.yml`.

### IPTables Firewall

Expand Down Expand Up @@ -239,7 +239,7 @@ Then restart for the changes to take effect:
sudo reboot
```

In addition, you can reduce memory usage and improve stability by setting `PHOTOPRISM_WORKERS` to `1` in your `docker-compose.yml` file to limit the number of indexing workers.
In addition, you can reduce memory usage and improve stability by setting `PHOTOPRISM_WORKERS` to `1` in your `compose.yaml` or `docker-compose.yml` file to limit the number of indexing workers.

### Windows

Expand Down
Loading

0 comments on commit 5ee5bd0

Please sign in to comment.