diff --git a/.github/workflows/docker-vue3.yml b/.github/workflows/docker-vue3.yml index 81a0a07d..fc7c6c83 100644 --- a/.github/workflows/docker-vue3.yml +++ b/.github/workflows/docker-vue3.yml @@ -38,16 +38,19 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push (FacilMap) - id: docker_build_facilmap + name: Build docker image (FacilMap) uses: docker/build-push-action@v5 with: - push: true + load: true # Needed to be accessible as $TAG below for yarn cache context: . tags: ${{env.TAG}} cache-from: type=gha cache-to: type=gha,mode=max + - + name: Push docker image (FacilMap) + run: docker push "$TAG" + - name: Populate Yarn cache run: rm -f .yarn/cache/* && docker cp "$(docker create "$TAG"):/opt/facilmap/.yarn/cache/." .yarn/cache/ && ls .yarn/cache \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index c30dec8f..eeeb6527 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,8 @@ WORKDIR /opt/facilmap/server COPY ./ ../ +RUN ls ../.yarn/cache + RUN chown -R facilmap:facilmap /opt/facilmap USER facilmap