Update with assets path
This commit is contained in:
parent
6365a2ecb2
commit
da49f378c6
2 changed files with 32 additions and 3 deletions
|
|
@ -26,9 +26,9 @@ FROM nginx:alpine AS runner
|
|||
|
||||
# Copy built app and static assets
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
COPY --from=builder /app/public/images /usr/share/nginx/html/images
|
||||
COPY --from=builder /app/public/subtitles /usr/share/nginx/html/subtitles
|
||||
COPY --from=builder /app/public/transcriptions /usr/share/nginx/html/transcriptions
|
||||
COPY public/images /usr/share/nginx/html/images
|
||||
COPY public/subtitles /usr/share/nginx/html/subtitles
|
||||
COPY public/transcriptions /usr/share/nginx/html/transcriptions
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Create videos directory for volume mount
|
||||
|
|
|
|||
29
nginx.conf
29
nginx.conf
|
|
@ -31,6 +31,35 @@ server {
|
|||
add_header Accept-Ranges bytes;
|
||||
}
|
||||
|
||||
# Images handling
|
||||
location /images/ {
|
||||
alias /usr/share/nginx/html/images/;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
types {
|
||||
image/png png;
|
||||
image/jpeg jpg jpeg;
|
||||
image/svg+xml svg;
|
||||
}
|
||||
}
|
||||
|
||||
# Subtitles handling
|
||||
location /subtitles/ {
|
||||
alias /usr/share/nginx/html/subtitles/;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
types {
|
||||
text/vtt vtt;
|
||||
}
|
||||
}
|
||||
|
||||
# Transcriptions handling
|
||||
location /transcriptions/ {
|
||||
alias /usr/share/nginx/html/transcriptions/;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
types {
|
||||
text/plain txt;
|
||||
}
|
||||
}
|
||||
|
||||
# Static asset caching
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|vtt|txt)$ {
|
||||
expires 30d;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue