Versioned yarn.lock, fixed docker build

main
Igor Scheller 5 years ago
parent 030e1ab38d
commit 2e0c82ea05

1
.gitignore vendored

@ -3,7 +3,6 @@
.~* .~*
*.tmp *.tmp
*.temp *.temp
*.lock
*.DS_Store *.DS_Store
.*.swp .*.swp
*.out *.out

@ -34,13 +34,11 @@ build-image.nginx:
expire_in: 1 day expire_in: 1 day
paths: paths:
- ./public/assets - ./public/assets
- ./yarn.lock
script: script:
- docker build --pull -t "${TEST_IMAGE}-nginx" -f contrib/nginx/Dockerfile . - docker build --pull -t "${TEST_IMAGE}-nginx" -f contrib/nginx/Dockerfile .
- docker push "${TEST_IMAGE}-nginx" - docker push "${TEST_IMAGE}-nginx"
- instance=$(docker create "${TEST_IMAGE}-nginx") - instance=$(docker create "${TEST_IMAGE}-nginx")
- docker cp "${instance}:/var/www/public/assets" public/ - docker cp "${instance}:/var/www/public/assets" public/
- docker cp "${instance}:/var/www/yarn.lock" .
- docker rm "${instance}" - docker rm "${instance}"
build-image: build-image:
@ -124,7 +122,6 @@ build-release-file:
script: script:
- rsync -vAax "${DOCROOT}" "${DOCROOT}/.babelrc" "${DOCROOT}/.browserslistrc" release/ - rsync -vAax "${DOCROOT}" "${DOCROOT}/.babelrc" "${DOCROOT}/.browserslistrc" release/
- rsync -vAax public/assets release/public/ - rsync -vAax public/assets release/public/
- rsync -vAax yarn.lock release/
deploy-staging: deploy-staging:
<<: *deploy_definition <<: *deploy_definition

@ -6,7 +6,7 @@ RUN composer --no-ansi dump-autoload --optimize
# Intermediate container for less layers # Intermediate container for less layers
FROM alpine as data FROM alpine as data
COPY .babelrc .browserslistrc composer.json LICENSE package.json README.md webpack.config.js /app/ COPY .babelrc .browserslistrc composer.json LICENSE package.json README.md webpack.config.js yarn.lock /app/
COPY bin/ /app/bin COPY bin/ /app/bin
COPY config/ /app/config COPY config/ /app/config
COPY db/ /app/db COPY db/ /app/db

@ -9,4 +9,3 @@ FROM nginx:alpine
RUN mkdir -p /var/www/public/ && touch /var/www/public/index.php RUN mkdir -p /var/www/public/ && touch /var/www/public/index.php
COPY contrib/nginx/nginx.conf /etc/nginx/nginx.conf COPY contrib/nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=themes /app/public/assets /var/www/public/assets/ COPY --from=themes /app/public/assets /var/www/public/assets/
COPY --from=themes /app/yarn.lock /var/www/

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save