From 5269f9b25aee498717077c4b7bc144fd0afbec3f Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Tue, 28 Nov 2017 19:12:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=B7=D0=B4=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20runtime=20=D0=BF=D0=B0=D0=BF=D0=BE=D0=BA=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=BD=D0=B5=D1=81=D0=B5=D0=BD=D0=BE=20=D0=B2=20bootstrap?= =?UTF-8?q?.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 ++---- Dockerfile-dev | 6 ++---- docker/php/bootstrap.sh | 3 +++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 17c3985..3b5968d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,10 +43,8 @@ RUN rm -rf /root/.ssh # Наконец переносим все сорцы внутрь контейнера COPY . /var/www/html -RUN mkdir -p api/runtime api/web/assets console/runtime \ - && chown www-data:www-data api/runtime api/web/assets console/runtime \ - # Билдим фронт - && cd frontend \ +# Билдим фронт +RUN cd frontend \ && ln -s /var/www/frontend/node_modules $PWD/node_modules \ && npm run build:quiet \ && rm node_modules \ diff --git a/Dockerfile-dev b/Dockerfile-dev index b2ea2a5..f32b2e7 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -40,10 +40,8 @@ RUN cd ../frontend \ # Наконец переносим все сорцы внутрь контейнера COPY . /var/www/html -RUN mkdir -p api/runtime api/web/assets console/runtime \ - && chown www-data:www-data api/runtime api/web/assets console/runtime \ - # Билдим фронт - && cd frontend \ +# Билдим фронт +RUN cd frontend \ && ln -s /var/www/frontend/node_modules $PWD/node_modules \ && npm run build:quiet \ && rm node_modules \ diff --git a/docker/php/bootstrap.sh b/docker/php/bootstrap.sh index 81be543..65617dd 100755 --- a/docker/php/bootstrap.sh +++ b/docker/php/bootstrap.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +mkdir -p api/runtime api/web/assets console/runtime +chown www-data:www-data api/runtime api/web/assets console/runtime + if [ "$YII_ENV" = "test" ] then YII_EXEC="/var/www/html/tests/codeception/bin/yii"