From 4e8818842c26040d40fb844b51c185c5f0a051d9 Mon Sep 17 00:00:00 2001 From: Robin Date: Tue, 24 Sep 2024 20:17:51 +0000 Subject: [PATCH] chore: adjust Dockerfiles --- apps/backend/package.json | 28 ---------------------------- apps/frontend/package.json | 28 ---------------------------- nx.json | 24 ++++++++++++++++++++++++ 3 files changed, 24 insertions(+), 56 deletions(-) diff --git a/apps/backend/package.json b/apps/backend/package.json index 0b9548aa..f3cc95eb 100644 --- a/apps/backend/package.json +++ b/apps/backend/package.json @@ -66,33 +66,5 @@ ], "coverageDirectory": "../coverage", "testEnvironment": "node" - }, - "nx": { - "targets": { - "container": { - "executor": "@nx-tools/nx-container:build", - "dependsOn": [ - "build" - ], - "options": { - "context": "{projectRoot}", - "dockerfile": "{projectRoot}/Dockerfile", - "engine": "docker", - "metadata": { - "images": [ - "backend" - ], - "load": true, - "tags": [ - "type=schedule", - "type=ref,event=branch", - "type=ref,event=tag", - "type=ref,event=pr", - "type=sha,prefix=sha-" - ] - } - } - } - } } } diff --git a/apps/frontend/package.json b/apps/frontend/package.json index b97e7abd..3350c60e 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -25,33 +25,5 @@ "typescript": "^5.5.3", "typescript-eslint": "^8.0.1", "vite": "^5.4.1" - }, - "nx": { - "targets": { - "container": { - "executor": "@nx-tools/nx-container:build", - "dependsOn": [ - "build" - ], - "options": { - "context": "{projectRoot}", - "dockerfile": "{projectRoot}/Dockerfile", - "engine": "docker", - "metadata": { - "images": [ - "frontend" - ], - "load": true, - "tags": [ - "type=schedule", - "type=ref,event=branch", - "type=ref,event=tag", - "type=ref,event=pr", - "type=sha,prefix=sha-" - ] - } - } - } - } } } diff --git a/nx.json b/nx.json index cbf64df7..f5835c0a 100644 --- a/nx.json +++ b/nx.json @@ -11,6 +11,30 @@ "cache": true, "outputs": ["{projectRoot}/dist"] }, + "container": { + "executor": "@nx-tools/nx-container:build", + "dependsOn": [ + "build" + ], + "options": { + "context": "{projectRoot}", + "dockerfile": "{projectRoot}/Dockerfile", + "engine": "docker", + "metadata": { + "images": [ + "{projectName}" + ], + "push": true, + "tags": [ + "type=schedule", + "type=ref,event=branch", + "type=ref,event=tag", + "type=ref,event=pr", + "type=sha,prefix=sha-" + ] + } + } + }, "dev": { "dependsOn": ["^build"] }