Skip to content

Commit

Permalink
feat!: use nginx to serve media files (#2860)
Browse files Browse the repository at this point in the history
Closes #2522

To reduce the strain on the API service, we moved the media file serving
to the Nginx web server. The API is still handling the authentication,
but delegates the serving using the `X-Accel-Redirect` header.

BREAKING CHANGE: The media file serving is now handled by Nginx instead
of the API service. The `storage.path` field is now used in the Nginx
configuration, so make sure to update the Nginx configuration file if
you change it.
libretime/libretime@4603c17
  • Loading branch information
libretime-bot committed Dec 30, 2023
1 parent edc8936 commit e1185f5
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion docs/admin-manual/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,32 @@ The `storage` section configure the project storage.

```yml
storage:
# Path of the storage directory.
# Path of the storage directory. Make sure to update the Nginx configuration after
# updating the storage path.
# > default is /srv/libretime
path: "/srv/libretime"
```

:::caution

After editing the `storage.path` field, make sure to update the LibreTime Nginx configuration file with the new value.

In the example below, we are changing the path from `/srv/libretime` to `/mnt/data`:

```patch
...
# Internal path for serving media files from the API.
location /api/_media {
internal;
# This alias path must match the 'storage.path' configuration field.
- alias /srv/libretime;
+ alias /mnt/data;
}
```

:::

## Database

The `database` section configure the PostgreSQL connection.
Expand Down

0 comments on commit e1185f5

Please sign in to comment.