Fix Docker build: add ext-zip, clean cache, fix DB_DATABASE default
- Add php zip extension to Dockerfile (required by ZipArchive) - Remove bootstrap/cache/*.php during build to prevent stale dev-only service providers (e.g. BoostServiceProvider) from loading - Default DB_DATABASE to /app/database/database.sqlite in docker-compose.yml so env() fallback works correctly Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
729e01462b
commit
a6f604078b
+4
-2
@@ -45,7 +45,8 @@ LABEL org.opencontainers.image.description="Self-hosted encrypted file sharing"
|
||||
# Install required PHP extensions
|
||||
RUN install-php-extensions \
|
||||
intl \
|
||||
pcntl
|
||||
pcntl \
|
||||
zip
|
||||
|
||||
# Laravel environment defaults
|
||||
ENV APP_NAME="SealShare" \
|
||||
@@ -80,8 +81,9 @@ COPY --from=vendor /app/vendor ./vendor
|
||||
# Copy built frontend assets from node stage
|
||||
COPY --from=assets /app/public/build ./public/build
|
||||
|
||||
# Remove dev/build files not needed in production
|
||||
# Remove dev/build files and stale cache not needed in production
|
||||
RUN rm -rf node_modules tests .github docker/dev.Dockerfile docker/dev-entrypoint.sh .env .env.example \
|
||||
bootstrap/cache/*.php \
|
||||
&& mkdir -p storage/app/shares storage/app/public storage/framework/cache \
|
||||
storage/framework/sessions storage/framework/testing storage/framework/views \
|
||||
storage/logs database \
|
||||
|
||||
+2
-2
@@ -23,7 +23,7 @@ services:
|
||||
DB_CONNECTION: ${DB_CONNECTION:-sqlite}
|
||||
DB_HOST: ${DB_HOST:-}
|
||||
DB_PORT: ${DB_PORT:-}
|
||||
DB_DATABASE: ${DB_DATABASE:-}
|
||||
DB_DATABASE: ${DB_DATABASE:-/app/database/database.sqlite}
|
||||
DB_USERNAME: ${DB_USERNAME:-}
|
||||
DB_PASSWORD: ${DB_PASSWORD:-}
|
||||
LOG_CHANNEL: ${LOG_CHANNEL:-stderr}
|
||||
@@ -63,7 +63,7 @@ services:
|
||||
DB_CONNECTION: ${DB_CONNECTION:-sqlite}
|
||||
DB_HOST: ${DB_HOST:-}
|
||||
DB_PORT: ${DB_PORT:-}
|
||||
DB_DATABASE: ${DB_DATABASE:-}
|
||||
DB_DATABASE: ${DB_DATABASE:-/app/database/database.sqlite}
|
||||
DB_USERNAME: ${DB_USERNAME:-}
|
||||
DB_PASSWORD: ${DB_PASSWORD:-}
|
||||
LOG_CHANNEL: ${LOG_CHANNEL:-stderr}
|
||||
|
||||
Reference in New Issue
Block a user