refactor(docker): lint Dockerfile

This commit is contained in:
Fernando Fernández 2022-01-13 14:11:47 +01:00 committed by Thibault
parent a202b4a384
commit 4587d15e52
3 changed files with 10 additions and 16 deletions

View File

@ -1,14 +1,11 @@
server {
# You would want to make a separate file with its own server block for each virtual domain
# on your server and then include them.
listen 80;
server {
listen 80;
root /usr/share/nginx/html;
root /usr/share/nginx/html;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to redirecting to index.html
# This is needed for history mode in Vue router
try_files $uri $uri/ /index.html;
}
}
location / {
# First attempt to serve request as file, then as directory, then fall back to redirecting to index.html
# This is needed for history mode in Vue router
try_files $uri $uri/ /index.html;
}
}

View File

@ -1,6 +1,5 @@
## This dockerfile builds the client entirely in a Docker context
FROM node:16-alpine AS build
# Set build arguments
@ -33,7 +32,6 @@ RUN npm run build
FROM nginx:alpine
COPY --from=build /app/src/dist/ /usr/share/nginx/html/
COPY --from=build /app/.docker/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
@ -41,4 +39,4 @@ EXPOSE 80
# Set labels
LABEL maintainer="Jellyfin Packaging Team - packaging@jellyfin.org"
LABEL org.opencontainers.image.source="https://github.com/jellyfin/jellyfin-vue"
LABEL org.opencontainers.image.description "Commit: ${NUXT_ENV_COMMIT} History router rode: ${HISTORY_ROUTER_MODE}"
LABEL org.opencontainers.image.description="Commit: ${NUXT_ENV_COMMIT} History router rode: ${HISTORY_ROUTER_MODE}"

View File

@ -135,7 +135,6 @@ const config: NuxtConfig = {
}
}
},
// mode: process.env.HISTORY_ROUTER_MODE == '1' ? 'history' : 'hash'
mode: process.env.HISTORY_ROUTER_MODE === '1' ? 'history' : 'hash'
},
/*