From efd2e762e36c65490e6feb106e13b661f5a8070b Mon Sep 17 00:00:00 2001 From: JaiPannu-IITI Date: Fri, 28 Feb 2025 04:16:13 +0530 Subject: [PATCH 1/4] removing auto start to make detach possible --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 30b5118b5e0..4d1177a70b3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -70,7 +70,7 @@ "initializeCommand": "/bin/sh -c '[ ! -f .env ] && cp ./envFiles/.env.devcontainer ./.env || true'", "name": "talawa_api", "overrideCommand": true, - "postCreateCommand": "sudo chown talawa:talawa ./.pnpm-store ./node_modules && fnm install && fnm use && corepack enable npm && corepack enable && corepack install && pnpm install && pnpm start_development_server", + "postCreateCommand": "sudo chown talawa:talawa ./.pnpm-store ./node_modules && fnm install && fnm use && corepack enable npm && corepack enable && corepack install && pnpm install", "postStartCommand": "pnpm install", "remoteUser": "talawa", "service": "api", From 8ac879071e7ab9ae524417c1e525b03ac4dc571c Mon Sep 17 00:00:00 2001 From: JaiPannu-IITI Date: Fri, 28 Feb 2025 04:53:37 +0530 Subject: [PATCH 2/4] docs --- docs/docs/docs/developer-resources/testing.md | 1 + .../docs/docs/getting-started/installation.md | 26 ++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/docs/docs/developer-resources/testing.md b/docs/docs/docs/developer-resources/testing.md index 211fa055812..af3ffa0fc03 100644 --- a/docs/docs/docs/developer-resources/testing.md +++ b/docs/docs/docs/developer-resources/testing.md @@ -819,6 +819,7 @@ Sometimes you may want to start all over again from scratch. These steps will re ```bash devcontainer build --workspace-folder . devcontainer up --workspace-folder . + docker exec talawa-api-1 /bin/bash -c 'pnpm run start_development_server' ``` Now you can resume your development work. diff --git a/docs/docs/docs/getting-started/installation.md b/docs/docs/docs/getting-started/installation.md index fb5a5f6b9e2..df8ae54ad94 100644 --- a/docs/docs/docs/getting-started/installation.md +++ b/docs/docs/docs/getting-started/installation.md @@ -307,18 +307,13 @@ devcontainer build --workspace-folder . devcontainer up --workspace-folder . ``` -12. When the startup is complete, the last line of out put should look like this: +12. When the container installation is complete, the last line of out put should look like this: ``` ... ... ... -[19:53:14.113] INFO (166): Server listening at http://127.0.0.1:4000 -[19:53:14.113] INFO (166): Server listening at http://172.23.0.3:4000 -[19:53:14.113] INFO (166): Server listening at http://172.20.0.2:4000 -[19:53:14.113] INFO (166): Server listening at http://172.19.0.3:4000 -[19:53:14.113] INFO (166): Server listening at http://172.21.0.3:4000 -[19:53:14.113] INFO (166): Server listening at http://172.22.0.4:4000 +{"outcome":"success","containerId":"81306766f2aeeb851c8ebb844702d39ad2adc09419508b736ef2ee5a03eb8e34","composeProjectName":"talawa","remoteUser":"talawa","remoteWorkspaceFolder":"/home/talawa/api"} ``` All done! @@ -333,12 +328,19 @@ docker compose down #### CLI Startup (Development) -After a successful installation, use these commands in sequence to start the dev container. +After a successful installation, use these commands to start the dev container. -``` -devcontainer build --workspace-folder . -devcontainer up --workspace-folder . -``` +1. Attached Mode + + ``` + docker exec talawa-api-1 /bin/bash -c 'pnpm run start_development_server' + ``` + +2. Detached Mode + + ``` + docker exec talawa-api-1 /bin/bash -c 'nohup pnpm run start_development_server > /devnull 2>&1 &' + ``` #### Importing Sample Data From c4a67a3da608871a312255d70cd4388dcd4e8a60 Mon Sep 17 00:00:00 2001 From: JaiPannu-IITI Date: Fri, 28 Feb 2025 05:03:20 +0530 Subject: [PATCH 3/4] update --- docs/docs/docs/getting-started/installation.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/docs/docs/getting-started/installation.md b/docs/docs/docs/getting-started/installation.md index df8ae54ad94..7610e3761f5 100644 --- a/docs/docs/docs/getting-started/installation.md +++ b/docs/docs/docs/getting-started/installation.md @@ -312,7 +312,6 @@ devcontainer up --workspace-folder . ``` ... ... -... {"outcome":"success","containerId":"81306766f2aeeb851c8ebb844702d39ad2adc09419508b736ef2ee5a03eb8e34","composeProjectName":"talawa","remoteUser":"talawa","remoteWorkspaceFolder":"/home/talawa/api"} ``` @@ -339,7 +338,7 @@ After a successful installation, use these commands to start the dev container. 2. Detached Mode ``` - docker exec talawa-api-1 /bin/bash -c 'nohup pnpm run start_development_server > /devnull 2>&1 &' + docker exec talawa-api-1 /bin/bash -c 'nohup pnpm run start_development_server > /dev/null 2>&1 &' ``` #### Importing Sample Data From d5b2aee5109afd96217ace24f5c70922a1d6f878 Mon Sep 17 00:00:00 2001 From: JaiPannu-IITI Date: Fri, 28 Feb 2025 05:08:22 +0530 Subject: [PATCH 4/4] Empty commit for triggering Workflow