dockerfile? Долго пзц собирает
FROM node:carbon as frontend
COPY ./orion-site/frontend /project
WORKDIR /project
RUN /bin/bash -c "npm install && npm i -g --unsafe-perm tars-cli && TARS_ENV=stage && tars build -m"
FROM composer as composer
COPY ./orion-site /app
WORKDIR /app
RUN composer install
FROM lohmag/php-fpm7.1:laravel
COPY ./orion-site /var/www/
COPY ./dockerconf /etc/dockerconf
RUN cp /var/www/.env.prod /var/www/.env
RUN rm -rf /var/www/public/build
COPY --from=frontend /project/dev /var/www/public/build
COPY --from=composer /app/vendor /var/www/vendor
WORKDIR /var/www/
у tars-а какой-нить lockfile есть?
FROM node:carbon as frontend WORKDIR /project COPY ./orion-site/frontend/package.json ./orion-site/frontend/package.lock /project/ RUN npm install && npm i -g --unsafe-perm tars-cli COPY ./orion-site/frontend /project RUN TARS_ENV=stage tars build -m FROM composer as composer WORKDIR /app COPY ./orion-site/package.json RUN composer install COPY ./orion-site /app FROM lohmag/php-fpm7.1:laravel COPY ./orion-site /var/www/ COPY ./dockerconf /etc/dockerconf RUN cp /var/www/.env.prod /var/www/.env RUN rm -rf /var/www/public/build COPY --from=frontend /project/dev /var/www/public/build COPY --from=composer /app/vendor /var/www/vendor WORKDIR /var/www/
Надо тайминги сомтреть... npm заранее подготовить в base там... архив копировать и распаковывать, вмеcто копинга, если на гига вопрос...
Обсуждают сегодня