From e9df7b62e712c03cc63133b608f40a87ccb7da57 Mon Sep 17 00:00:00 2001 From: vr-varad <114755221+vr-varad@users.noreply.github.com> Date: Thu, 6 Jun 2024 12:54:33 +0530 Subject: [PATCH 1/4] Added docker build and run commands to` package.json` --- package.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6a0b3eb4..fb021202 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,11 @@ "db:reset": "pnpm run --filter=api db:reset", "format": "prettier apps/**/*.{ts,tsx} --write", "prepare": "husky", - "sourcemaps:api": "turbo run sourcemaps --filter=api" + "sourcemaps:api": "turbo run sourcemaps --filter=api", + "docker:build:api": "docker build -t ks-api -f apps/api/Dockerfile .", + "docker:run:api": "docker run -p 4200:4200 ks-api", + "docker:build:web": "docker build -t ks-web -f apps/web/Dockerfile .", + "docker:run:web": "docker run -p 3000:3000 ks-web" }, "devDependencies": { "@sentry/cli": "^2.28.6", From 6ab5812060fa4c3bfe03718923c488f3a7e0913c Mon Sep 17 00:00:00 2001 From: vr-varad <114755221+vr-varad@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:00:27 +0530 Subject: [PATCH 2/4] fix: added docker commands (followed valid pr temp) --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index fb021202..59c57a0d 100644 --- a/package.json +++ b/package.json @@ -124,10 +124,10 @@ "format": "prettier apps/**/*.{ts,tsx} --write", "prepare": "husky", "sourcemaps:api": "turbo run sourcemaps --filter=api", - "docker:build:api": "docker build -t ks-api -f apps/api/Dockerfile .", - "docker:run:api": "docker run -p 4200:4200 ks-api", + "docker:run:web": "docker run -p 3000:3000 ks-web", "docker:build:web": "docker build -t ks-web -f apps/web/Dockerfile .", - "docker:run:web": "docker run -p 3000:3000 ks-web" + "docker:build:api": "docker build -t ks-api -f apps/api/Dockerfile .", + "docker:run:api": "docker run -p 4200:4200 ks-api" }, "devDependencies": { "@sentry/cli": "^2.28.6", From 7e45740d8f6289fa460e51978f4702313c36ba78 Mon Sep 17 00:00:00 2001 From: vr-varad <114755221+vr-varad@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:49:06 +0530 Subject: [PATCH 3/4] added --env-file .env --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 59c57a0d..7d6a2ecc 100644 --- a/package.json +++ b/package.json @@ -124,10 +124,10 @@ "format": "prettier apps/**/*.{ts,tsx} --write", "prepare": "husky", "sourcemaps:api": "turbo run sourcemaps --filter=api", - "docker:run:web": "docker run -p 3000:3000 ks-web", + "docker:run:web": "docker run --env-file .env -p 3000:3000 ks-web", "docker:build:web": "docker build -t ks-web -f apps/web/Dockerfile .", - "docker:build:api": "docker build -t ks-api -f apps/api/Dockerfile .", - "docker:run:api": "docker run -p 4200:4200 ks-api" + "docker:run:api": "docker run --env-file .env -p 4200:4200 ks-api", + "docker:build:api": "docker build -t ks-api -f apps/api/Dockerfile ." }, "devDependencies": { "@sentry/cli": "^2.28.6", From b5d7c17bbc5a0e585ce73c372bab88d9f98e7c0b Mon Sep 17 00:00:00 2001 From: vr-varad <114755221+vr-varad@users.noreply.github.com> Date: Fri, 7 Jun 2024 11:33:08 +0530 Subject: [PATCH 4/4] added --name and --rm --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 7d6a2ecc..19cef4d3 100644 --- a/package.json +++ b/package.json @@ -124,9 +124,9 @@ "format": "prettier apps/**/*.{ts,tsx} --write", "prepare": "husky", "sourcemaps:api": "turbo run sourcemaps --filter=api", - "docker:run:web": "docker run --env-file .env -p 3000:3000 ks-web", + "docker:run:web": "docker run --env-file .env --name ks-web --rm -p 3000:3000 ks-web", "docker:build:web": "docker build -t ks-web -f apps/web/Dockerfile .", - "docker:run:api": "docker run --env-file .env -p 4200:4200 ks-api", + "docker:run:api": "docker run --env-file .env --name ks-api --rm -p 4200:4200 ks-api", "docker:build:api": "docker build -t ks-api -f apps/api/Dockerfile ." }, "devDependencies": {