Skip to content

Commit

Permalink
feat: use nginx to serve media files (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola committed Dec 30, 2023
1 parent e68ca9e commit 9fe4f41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/libretime/config.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ general:
auth: local

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: {{ libretime_storage_dir }}

Expand Down
7 changes: 7 additions & 0 deletions templates/nginx/libretime.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,11 @@ server {
proxy_redirect off;
proxy_pass http://unix:/run/libretime-api.sock;
}

# Internal path for serving media files from the API.
location /api/_media {
internal;
# This alias path must match the 'storage.path' configuration field.
alias {{ libretime_storage_dir }};
}
}

0 comments on commit 9fe4f41

Please sign in to comment.