Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use nginx to serve media files #68

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }};
}
}