From 6be407de64602d6ccda38484de8d45cce22d27aa Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Sat, 27 Jul 2024 17:35:10 +0530 Subject: [PATCH 1/6] docker test ci --- .github/workflows/docker-ci.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/docker-ci.yml diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml new file mode 100644 index 00000000..de8a7433 --- /dev/null +++ b/.github/workflows/docker-ci.yml @@ -0,0 +1,17 @@ +name: Docker Check + +on: + push: + paths: + - '**Dockerfile' + pull_request: + paths: + - '**Dockerfile' +jobs: + build-image-1: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Build Docker Image + run: docker build -f apps/** . From 63d203f1e0817bea64249a5463fbd6d45c0a580c Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Sat, 27 Jul 2024 17:41:26 +0530 Subject: [PATCH 2/6] testing changes --- apps/web/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 4fa65827..5d41ebf3 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -28,6 +28,7 @@ COPY --from=builder /app/out/full/ . COPY turbo.json turbo.json + RUN pnpm turbo build --filter=web... FROM base AS runner From f84deb7b69673cce55599f604c91f516e8f272d5 Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Sat, 27 Jul 2024 17:46:48 +0530 Subject: [PATCH 3/6] new-changes --- .github/workflows/docker-ci.yml | 7 ++++++- apps/web/Dockerfile | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index de8a7433..8dc47adb 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -14,4 +14,9 @@ jobs: - uses: actions/checkout@v2 - name: Build Docker Image - run: docker build -f apps/** . + run: | + for dir in app/*/ ; do + if [ -f "$dir/Dockerfile" ]; then + docker build -f "$dir/Dockerfile" "$dir" + fi + done diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index 5d41ebf3..e4703e1f 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -27,8 +27,6 @@ RUN pnpm install --no-cache --ignore-scripts COPY --from=builder /app/out/full/ . COPY turbo.json turbo.json - - RUN pnpm turbo build --filter=web... FROM base AS runner From 63d662ed5f51dd6570044e0479d9c375ddcfcafc Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Sat, 27 Jul 2024 17:48:29 +0530 Subject: [PATCH 4/6] testing multiple files --- apps/platform/Dockerfile | 3 +++ apps/web/Dockerfile | 2 ++ 2 files changed, 5 insertions(+) diff --git a/apps/platform/Dockerfile b/apps/platform/Dockerfile index ef063a3f..b903b5ab 100644 --- a/apps/platform/Dockerfile +++ b/apps/platform/Dockerfile @@ -16,6 +16,9 @@ RUN apk add --no-cache libc6-compat RUN apk update WORKDIR /app + + + # install the dependencies RUN npm install --ignore-scripts -g pnpm COPY .gitignore .gitignore diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index e4703e1f..5d41ebf3 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -27,6 +27,8 @@ RUN pnpm install --no-cache --ignore-scripts COPY --from=builder /app/out/full/ . COPY turbo.json turbo.json + + RUN pnpm turbo build --filter=web... FROM base AS runner From 69d29b7d8beb99df4d81f28af3a38308ce6813e7 Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Sat, 27 Jul 2024 17:52:04 +0530 Subject: [PATCH 5/6] getting-back-changes --- apps/platform/Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/platform/Dockerfile b/apps/platform/Dockerfile index b903b5ab..ef063a3f 100644 --- a/apps/platform/Dockerfile +++ b/apps/platform/Dockerfile @@ -16,9 +16,6 @@ RUN apk add --no-cache libc6-compat RUN apk update WORKDIR /app - - - # install the dependencies RUN npm install --ignore-scripts -g pnpm COPY .gitignore .gitignore From efc20db5a796b5f8424e472fa4e422ec72be2070 Mon Sep 17 00:00:00 2001 From: Dhairya Majmudar <2022kuec2045@iiitkota.ac.in> Date: Sat, 27 Jul 2024 19:50:06 +0530 Subject: [PATCH 6/6] job name change --- .github/workflows/docker-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 8dc47adb..08ecf7ca 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -8,7 +8,7 @@ on: paths: - '**Dockerfile' jobs: - build-image-1: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2