Commit fc6b3cd3 authored by Richard Marston's avatar Richard Marston
Browse files

Dockerfile copy improvement & VM deploy

parent 087ffb02
Pipeline #248682 passed with stage
in 3 minutes and 32 seconds
...@@ -22,9 +22,9 @@ deploy:docker: ...@@ -22,9 +22,9 @@ deploy:docker:
stage: deploy stage: deploy
script: script:
- docker push ${DOCKER_IMAGE}:${DOCKER_TAG} - docker push ${DOCKER_IMAGE}:${DOCKER_TAG}
- ssh-agent -s - eval $(ssh-agent -s)
- echo "${SSH_DEPLOY_KEY}" | perl -p -e 's/&&&&&&&&/\n/g' | ssh-add - > /dev/null - echo "${SSH_DEPLOY_KEY}" | perl -p -e 's/&&&&&&&&/\n/g' | ssh-add - > /dev/null
- ssh -o "StrictHostKeyChecking=no" "${VM_IP}" "cd Pintura && git pull && ./stop_docker.sh && make docker && make start" - ssh -l ubuntu -o "StrictHostKeyChecking=no" "${VM_IP}" "cd pintura && git checkout master && git pull && ./stop_docker.sh && make docker && make start"
dependencies: dependencies:
- build:docker - build:docker
tags: tags:
......
...@@ -25,9 +25,17 @@ RUN npm run build ...@@ -25,9 +25,17 @@ RUN npm run build
FROM node AS builder FROM node AS builder
COPY --from=xslt-builder /generated /pintura/cimmenu/templates/generated/ COPY --from=xslt-builder /generated /pintura/cimmenu/templates/generated/
COPY cimmenu data_model generateIndex.js Makefile package-lock.json cimsvg Dockerfile images test css Dockerfile.dev index.js package.json /pintura
WORKDIR pintura # copy data approximately in order of how often they change / how big they are
RUN rm -rf node_modules COPY data_model /pintura/data_model
COPY images /pintura/images
COPY css /pintura/css
COPY test/ /pintura/test
COPY cimmenu /pintura/cimmenu
COPY cimsvg /pintura/cimsvg
COPY generateIndex.js Makefile package-lock.json index.js package.json /pintura/
WORKDIR /pintura
RUN npm install RUN npm install
RUN npm run build RUN npm run build
......
...@@ -25,7 +25,16 @@ RUN npm run build ...@@ -25,7 +25,16 @@ RUN npm run build
FROM node AS builder FROM node AS builder
COPY --from=xslt-builder /generated /pintura/cimmenu/templates/generated/ COPY --from=xslt-builder /generated /pintura/cimmenu/templates/generated/
COPY . /pintura
# copy data approximately in order of how often they change / how big they are
COPY data_model /pintura/data_model
COPY images /pintura/images
COPY css /pintura/css
COPY test/ /pintura/test
COPY cimmenu /pintura/cimmenu
COPY cimsvg /pintura/cimsvg
COPY generateIndex.js Makefile package-lock.json index.js package.json /pintura/
WORKDIR pintura WORKDIR pintura
RUN rm -rf node_modules RUN rm -rf node_modules
RUN npm install RUN npm install
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment