diff --git a/alpine/5/Dockerfile b/alpine/5/Dockerfile index f1b14f4..208c618 100644 --- a/alpine/5/Dockerfile +++ b/alpine/5/Dockerfile @@ -49,6 +49,16 @@ RUN mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini # https://hub.docker.com/r/mlocati/php-extension-installer/tags COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/ +# Install chromium +RUN set -eux; \ + apk add --no-cache \ + font-isas-misc \ + supervisor \ + mysql-client \ + git \ + chromium \ + ttf-freefont + RUN install-php-extensions \ bcmath \ exif \ @@ -61,16 +71,6 @@ RUN install-php-extensions \ @composer \ && rm /usr/local/bin/install-php-extensions -# Install chromium -RUN set -eux; \ - apk add --no-cache \ - font-isas-misc \ - supervisor \ - mysql-client \ - git \ - chromium \ - ttf-freefont - # Copy files COPY rootfs / @@ -100,7 +100,7 @@ WORKDIR /var/www/app # Do not remove this ENV ENV IS_DOCKER true -RUN /usr/local/bin/composer install --no-dev --no-scripts +RUN /usr/local/bin/composer install --no-dev --no-scripts --no-interaction --no-autoloader # Override the environment settings from projects .env file ENV APP_ENV production diff --git a/alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh b/alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh index 7ae0488..4148adc 100755 --- a/alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh +++ b/alpine/5/rootfs/usr/local/bin/invoiceninja-init.sh @@ -24,7 +24,7 @@ docker_process_init_files() { echo done } -php artisan package:discover --ansi + php artisan config:cache php artisan optimize php artisan ninja:react @@ -36,6 +36,7 @@ if [ "$DB_READY" != "1" ]; then in_error "Error connecting to DB" fi +composer dump-autoload php artisan migrate --force # If first IN run, it needs to be initialized