diff --git a/.dockerignore b/.dockerignore index b512c09..826824d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,3 @@ -node_modules \ No newline at end of file +node_modules +.git +dist \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index dacfe74..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,37 +0,0 @@ -image: framasoft/vuefs:latest -stages: - - deploy - -pages: - stage: deploy - script: - - yarn install --pure-lockfile - - npm run build - - rm -r public/ && mv dist/ public/ - artifacts: - paths: - - public - cache: - paths: - - node_modules/ - -production: - stage: deploy - script: - - yarn install --pure-lockfile - - npm run build - - rm -r public/ && mv dist/ public/ - - mkdir "${HOME}/.ssh" - - chmod 700 "${HOME}/.ssh" - - echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; - - eval `ssh-agent -s` - - ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i); - - cd public && echo "put -r ." | sftp ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web; - only: - refs: - - master - variables: - - $DEPLOYEMENT_KEY - - $DEPLOYEMENT_KNOWN_HOSTS - - $DEPLOYEMENT_USER - - $DEPLOYEMENT_HOST diff --git a/docker/Dockerfile b/docker/Dockerfile index 837efbc..3783045 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:10-buster-slim as build-stage +FROM node:13-alpine as build-stage WORKDIR /app @@ -6,12 +6,19 @@ COPY package.json . RUN yarn install --pure-lockfile \ && yarn cache clean -# TODO: copy only the required files here -COPY . . +COPY src/ src/ +COPY public/ public/ +COPY yarn.lock . +COPY .eslintrc.js . + +# TODO: the build works fine with only the above files, does that mean we can delete everything else? + +#COPY vue.config.js . +#COPY postcss.config.js . +#COPY .eslintrc . RUN yarn run build - FROM nginx as production-stage RUN mkdir /app COPY --from=build-stage /app/dist /app