From 9c0733453a86c9ea5c60e8833fb03f557f9d42df Mon Sep 17 00:00:00 2001 From: GlassedSilver Date: Sun, 1 May 2022 23:00:01 +0200 Subject: [PATCH 1/5] removing strict SSL from npm config --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9521c9a..c108068 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,7 @@ RUN apt-get update && apt-get -y install \ # spares us this spaghetti approach: https://stackoverflow.com/a/60547197 yarn && \ apt-get install -f && \ + npm config set strict-ssl false && \ npm install -g @angular/cli WORKDIR /build @@ -59,7 +60,8 @@ COPY --from=ffmpeg /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg COPY --from=ffmpeg /usr/local/bin/ffprobe /usr/local/bin/ffprobe COPY --chown=$UID:$GID [ "backend/package.json", "backend/package-lock.json", "/app/" ] ENV PM2_HOME=/app/pm2 -RUN npm install pm2 -g && \ +RUN npm config set strict-ssl false && \ + npm install pm2 -g && \ npm install && chown -R $UID:$GID ./ COPY --chown=$UID:$GID --from=frontend [ "/build/backend/public/", "/app/public/" ] From d5626f1dae295dd20891f8a6be5375f530abcf5e Mon Sep 17 00:00:00 2001 From: Glassed Silver Date: Sun, 1 May 2022 23:29:51 +0200 Subject: [PATCH 2/5] Dockerfile: wget not needed --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c108068..3b8ec2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ FROM ubuntu:20.04 as frontend ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get -y install \ - wget \ curl \ gnupg && \ curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ From 754d8370595b523f794a521a0ee0de8238094ad1 Mon Sep 17 00:00:00 2001 From: GlassedSilver Date: Mon, 2 May 2022 02:09:37 +0200 Subject: [PATCH 3/5] adding docker-pr-check.yml --- .github/workflows/docker-pr-check.yml | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/docker-pr-check.yml diff --git a/.github/workflows/docker-pr-check.yml b/.github/workflows/docker-pr-check.yml new file mode 100644 index 0000000..54e618d --- /dev/null +++ b/.github/workflows/docker-pr-check.yml @@ -0,0 +1,42 @@ +name: docker-pr-check + +on: + pull_request: + branches: [master] + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v2 + - name: Set hash + id: vars + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - name: create-json + id: create-json + uses: jsdaniell/create-json@1.1.2 + with: + name: "version.json" + json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}' + dir: 'backend/' + - name: setup platform emulator + uses: docker/setup-qemu-action@v1 + - name: setup multi-arch docker build + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: build & push images + uses: docker/build-push-action@v2 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64,linux/arm,linux/arm64/v8 + push: false + tags: tzahi12345/youtubedl-material:nightly-pr From f5f00e1732c6a507a9f39added542c7877b338fc Mon Sep 17 00:00:00 2001 From: GlassedSilver Date: Mon, 2 May 2022 02:12:10 +0200 Subject: [PATCH 4/5] fix name --- .github/workflows/{docker-pr-check.yml => docker-pr.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{docker-pr-check.yml => docker-pr.yml} (98%) diff --git a/.github/workflows/docker-pr-check.yml b/.github/workflows/docker-pr.yml similarity index 98% rename from .github/workflows/docker-pr-check.yml rename to .github/workflows/docker-pr.yml index 54e618d..1a2c5ab 100644 --- a/.github/workflows/docker-pr-check.yml +++ b/.github/workflows/docker-pr.yml @@ -1,4 +1,4 @@ -name: docker-pr-check +name: docker-pr on: pull_request: From 0abe252d1e24d5b46749238dfd1fd966ba29e53a Mon Sep 17 00:00:00 2001 From: GlassedSilver Date: Mon, 2 May 2022 02:59:25 +0200 Subject: [PATCH 5/5] we need to find a different build check solution --- .github/workflows/docker-pr.yml | 42 --------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 .github/workflows/docker-pr.yml diff --git a/.github/workflows/docker-pr.yml b/.github/workflows/docker-pr.yml deleted file mode 100644 index 1a2c5ab..0000000 --- a/.github/workflows/docker-pr.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: docker-pr - -on: - pull_request: - branches: [master] - -jobs: - build-and-push: - runs-on: ubuntu-latest - steps: - - name: checkout code - uses: actions/checkout@v2 - - name: Set hash - id: vars - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - - name: create-json - id: create-json - uses: jsdaniell/create-json@1.1.2 - with: - name: "version.json" - json: '{"type": "docker", "tag": "nightly", "commit": "${{ steps.vars.outputs.sha_short }}", "date": "${{ steps.date.outputs.date }}"}' - dir: 'backend/' - - name: setup platform emulator - uses: docker/setup-qemu-action@v1 - - name: setup multi-arch docker build - uses: docker/setup-buildx-action@v1 - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: build & push images - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64,linux/arm,linux/arm64/v8 - push: false - tags: tzahi12345/youtubedl-material:nightly-pr