mirror of
				https://github.com/elyby/accounts.git
				synced 2025-05-31 14:11:46 +05:30 
			
		
		
		
	Обновлена версия PHP, Node.js и перешли на использование yarn
This commit is contained in:
		| @@ -39,16 +39,23 @@ test:backend: | ||||
|             php vendor/bin/codecept run -c tests | ||||
|  | ||||
| test:frontend: | ||||
|     image: node:8.9.3-alpine | ||||
|     image: node:9.2.1-alpine | ||||
|     stage: test | ||||
|     cache: | ||||
|         paths: | ||||
|             - frontend/node_modules | ||||
|     before_script: | ||||
|         # Enable SSL support for wget | ||||
|         - apk add --update openssl | ||||
|         # https://github.com/facebook/flow/issues/3649#issuecomment-308070179 | ||||
|         - wget -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub | ||||
|         - wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.25-r0/glibc-2.25-r0.apk | ||||
|         - apk add glibc-2.25-r0.apk | ||||
|     script: | ||||
|         - cd frontend | ||||
|         - yarn run build:install | ||||
|         - yarn run lint | ||||
|         # - yarn flow # disabled due to missing libelf.so.1 in docker container | ||||
|         - yarn flow | ||||
|         - yarn test | ||||
|  | ||||
| build:production: | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| FROM registry.ely.by/elyby/accounts-php:1.5.1 | ||||
| FROM registry.ely.by/elyby/accounts-php:1.6.0 | ||||
|  | ||||
| # bootstrap скрипт для проекта | ||||
| COPY docker/php/bootstrap.sh /bootstrap.sh | ||||
| @@ -30,11 +30,12 @@ RUN cd .. \ | ||||
| RUN mkdir -p /var/www/frontend | ||||
|  | ||||
| COPY ./frontend/package.json /var/www/frontend/ | ||||
| COPY ./frontend/yarn.lock /var/www/frontend/ | ||||
| COPY ./frontend/scripts /var/www/frontend/scripts | ||||
| COPY ./frontend/webpack-utils /var/www/frontend/webpack-utils | ||||
|  | ||||
| RUN cd ../frontend \ | ||||
|  && npm run build:install \ | ||||
| RUN cd /var/www/frontend \ | ||||
|  && yarn run build:install \ | ||||
|  && cd - | ||||
|  | ||||
| # Удаляем ключи из production контейнера на всякий случай | ||||
| @@ -46,7 +47,7 @@ COPY . /var/www/html | ||||
| # Билдим фронт | ||||
| RUN cd frontend \ | ||||
|  && ln -s /var/www/frontend/node_modules $PWD/node_modules \ | ||||
|  && npm run build:quiet \ | ||||
|  && yarn run build:quiet \ | ||||
|  && rm node_modules \ | ||||
|  # Копируем билд наружу, чтобы его не затёрло volume в dev режиме | ||||
|  && cp -r ./dist /var/www/dist \ | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| FROM registry.ely.by/elyby/accounts-php:1.5.1-dev | ||||
| FROM registry.ely.by/elyby/accounts-php:1.6.0-dev | ||||
|  | ||||
| # bootstrap скрипт для проекта | ||||
| COPY docker/php/bootstrap.sh /bootstrap.sh | ||||
| @@ -30,11 +30,12 @@ RUN cd .. \ | ||||
| RUN mkdir -p /var/www/frontend | ||||
|  | ||||
| COPY ./frontend/package.json /var/www/frontend/ | ||||
| COPY ./frontend/yarn.lock /var/www/frontend/ | ||||
| COPY ./frontend/scripts /var/www/frontend/scripts | ||||
| COPY ./frontend/webpack-utils /var/www/frontend/webpack-utils | ||||
|  | ||||
| RUN cd ../frontend \ | ||||
|  && npm run build:install \ | ||||
| RUN cd /var/www/frontend \ | ||||
|  && yarn run build:install \ | ||||
|  && cd - | ||||
|  | ||||
| # Наконец переносим все сорцы внутрь контейнера | ||||
| @@ -43,7 +44,7 @@ COPY . /var/www/html | ||||
| # Билдим фронт | ||||
| RUN cd frontend \ | ||||
|  && ln -s /var/www/frontend/node_modules $PWD/node_modules \ | ||||
|  && npm run build:quiet \ | ||||
|  && yarn run build:quiet \ | ||||
|  && rm node_modules \ | ||||
|  # Копируем билд наружу, чтобы его не затёрло volume в dev режиме | ||||
|  && cp -r ./dist /var/www/dist \ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user