diff --git a/Dockerfile b/Dockerfile index 7777f9e..e570956 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,5 +11,7 @@ RUN npm run-script build FROM nginx:1.23.2 as runtume +ENV APP_VERSION=latest + COPY ./nginx/templates /etc/nginx/templates COPY --from=build /opt/neko/dist /opt/neko/dist diff --git a/nginx/templates/default.conf.template b/nginx/templates/default.conf.template index fd59286..8d5ac66 100644 --- a/nginx/templates/default.conf.template +++ b/nginx/templates/default.conf.template @@ -14,4 +14,9 @@ server { root /opt/neko/dist; index index.html; } + + location /version { + default_type application/json; + return 200 '{"version": "$APP_VERSION"}'; + } }