diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 00000000..ec9d366a --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,46 @@ +name: build & push docker container +on: + push: + branches: + - main + tags: + - '*' + pull_request: + branches: + - main +jobs: + docker: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Docker meta + id: metal + uses: docker/metadata-action@v4 + with: + images: | + ghcr.io/${{ github.repository }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Login to GitHub Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.metal.outputs.tags }} + labels: ${{ steps.metal.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.npmrc b/.npmrc index 4e105640..e4a0f0b7 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,4 @@ -# https://github.com/remix-run/remix/issues/154#issuecomment-978359765 -# shamefully-hoist=true +shamefully-hoist=true +strict-peer-dependencies=false +shell-emulator=true +ignore-workspace-root-check=true diff --git a/Dockerfile b/Dockerfile index 2c51f9f9..781f3d9d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,9 @@ COPY .gitignore .gitignore COPY --from=builder /app/out/json/ . COPY --from=builder /app/out/pnpm-*.yaml . RUN corepack enable -RUN pnpm i --frozen-lockfile +RUN corepack prepare pnpm@7.26.3 --activate + +RUN pnpm install --no-frozen-lockfile # Build the project COPY --from=builder /app/out/full/ .