From 72a75c701221ab17f2a742d998e694ab7ff8b474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Thu, 21 Nov 2019 18:10:19 +0800 Subject: [PATCH 1/2] Added script post-autoload-dump. --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index da37882b..95c1efe1 100644 --- a/composer.json +++ b/composer.json @@ -75,6 +75,9 @@ "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], + "post-autoload-dump": [ + "init-proxy.sh" + ], "test": "co-phpunit -c phpunit.xml --colors=always", "cs-fix": "php-cs-fixer fix $1", "analyze": "phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./app ./config", From 6c8762a5ce0d2adf2171a2754e225731360c7b0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=93=AD=E6=98=95?= <715557344@qq.com> Date: Thu, 21 Nov 2019 19:28:33 +0800 Subject: [PATCH 2/2] Update Dockerfile --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 13c5a442..d104a6f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,12 +49,10 @@ WORKDIR /opt/www # Composer Cache # COPY ./composer.* /opt/www/ -# RUN composer install --no-dev +# RUN composer install --no-dev --no-scripts COPY . /opt/www -RUN composer install --no-dev \ - && composer dump-autoload -o \ - && composer init-proxy +RUN composer install --no-dev -o EXPOSE 9501