A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
feat: reduce docker image size slightly by generating manifest within the build stage and not shipping git installed
aminnausin7f60ef48cf29
diff --git a/Dockerfile b/Dockerfileindex 19dacd8f..86401045 100644--- a/Dockerfile+++ b/Dockerfile@@ -27,26 +27,6 @@ RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefeUSER www-data-# =================================================================-# 1.5: Generate app manifest (intermediate builder)-# =================================================================-FROM serversideup/php:${SERVERSIDEUP_PHP_VERSION} AS manifest--USER root-WORKDIR /var/www/html--# Copy laravel app-COPY . .--# Copy installed dependencies-COPY --from=composer /var/www/html/vendor ./vendor--# Install Git-RUN apk add --no-cache git--# Generate app manifest-RUN php artisan app:manifest-# =================================================================# 2: Build Frontend# =================================================================@@ -131,7 +111,6 @@ COPY storage/app/public/thumbnails/default.webp /var/www/html/storage/app/publicCOPY --from=composer --chown=www-data:www-data /var/www/html/vendor ./vendorCOPY --from=builder --chown=www-data:www-data /var/www/html/public/build ./public/buildCOPY --from=puppeteer /app/node_modules ./node_modules-COPY --from=manifest /var/www/html/VERSION VERSIONCOPY --chown=www-data:www-data . .RUN composer dump-autoload \@@ -142,6 +121,12 @@ RUN composer dump-autoload \COPY --chown=www-data:www-data .env.example .envRUN chmod -R 755 /var/www/html/.env+# Generate manifest+RUN apk add --no-cache git && \+ php artisan app:manifest && \+ apk del git && \+ rm -rf /var/cache/apk/*+# NginxCOPY docker/etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.confRUN chown -R www-data:www-data /etc/nginx && \diff --git a/docker/entrypoint.d/1-keys.sh b/docker/entrypoint.d/1-keys.shindex 3d15ece7..8e421c0b 100644--- a/docker/entrypoint.d/1-keys.sh+++ b/docker/entrypoint.d/1-keys.sh@@ -51,4 +51,4 @@ elseecho "Updated Laravel .env with reverb keys."fi-php artisan app:manifest+# php artisan app:manifestdiff --git a/package.json b/package.jsonindex 3989fff1..795fa296 100755--- a/package.json+++ b/package.json@@ -28,7 +28,8 @@"pint": "php ./vendor/bin/pint","test": "vitest run","test:coverage": "vitest run --coverage",- "docker:build": "docker build . -t aminnausin/mediaserver:latest && docker push aminnausin/mediaserver:latest",+ "docker:build": "docker build . -t aminnausin/mediaserver:test",+ "docker:build-latest": "docker build . -t aminnausin/mediaserver:latest && docker push aminnausin/mediaserver:latest","docker:build-beta": "docker build . -t aminnausin/mediaserver:beta && docker push aminnausin/mediaserver:beta","docker:build-alpha": "docker build . -t aminnausin/mediaserver:alpha && docker push aminnausin/mediaserver:alpha"},