diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..32a5917d --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +**/node_modules +node_modules diff --git a/.drone.yml b/.drone.yml index 9848b88a..2e06511d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,6 +7,22 @@ platform: arch: amd64 steps: + - name: restore-cache-with-filesystem + image: meltwater/drone-cache:dev + when: + branch: + - develop + pull: true + settings: + backend: "filesystem" + restore: true + cache_key: '{{ .Repo.Name }}_{{ checksum "package.json" }}_{{ checksum "yarn.lock" }}_{{ arch }}_{{ os }}' + archive_format: "gzip" + mount: + - '/app/node_modules' + volumes: + - name: cache + path: /tmp/cache - name: build-master image: plugins/docker when: diff --git a/docker/nextjs/Dockerfile b/docker/nextjs/Dockerfile index e4e1dc40..248d0821 100644 --- a/docker/nextjs/Dockerfile +++ b/docker/nextjs/Dockerfile @@ -1,4 +1,5 @@ FROM node:14-alpine as builder +WORKDIR /app COPY package.json yarn.lock ./ RUN yarn COPY . .