Skip to content

Commit 017a389

Browse files
Fix: Detachable Script Execution (Better Docs) (PalisadoesFoundation#3317)
* removing auto start to make detach possible * docs * update * Empty commit for triggering Workflow * update * docs * fix * Empty commit for triggering Workflow * final * Empty commit for triggering Workflow * codebbit * final commit --------- Co-authored-by: JaiPannu-IITI <[email protected]>
1 parent d38e6a8 commit 017a389

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"initializeCommand": "/bin/sh -c '[ ! -f .env ] && cp ./envFiles/.env.devcontainer ./.env || true'",
7171
"name": "talawa_api",
7272
"overrideCommand": true,
73-
"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",
73+
"postCreateCommand": "sudo chown talawa:talawa ./.pnpm-store ./node_modules && fnm install && fnm use && corepack enable npm && corepack enable && corepack install && pnpm install",
7474
"postStartCommand": "pnpm install",
7575
"remoteUser": "talawa",
7676
"service": "api",

docs/docs/docs/developer-resources/testing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,7 @@ Sometimes you may want to start all over again from scratch. These steps will re
819819
```bash
820820
devcontainer build --workspace-folder .
821821
devcontainer up --workspace-folder .
822+
docker exec talawa-api-1 /bin/bash -c 'pnpm run start_development_server'
822823
```
823824

824825
Now you can resume your development work.

docs/docs/docs/getting-started/installation.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -295,49 +295,50 @@ These steps are specific to Linux. You will need to modify them accordingly for
295295
devcontainer build --workspace-folder .
296296
```
297297
298-
10. When the build is complete, the last line of the output should be:
298+
1. When the build is complete, the last line of the output should be:
299299
300300
```
301301
{"outcome":"success","imageName":"talawa-api"}
302302
```
303303
304-
11. Start the docker devcontainer
304+
1. Start the docker devcontainer
305305
306306
```
307307
devcontainer up --workspace-folder .
308308
```
309309
310-
12. When the startup is complete, the last line of out put should look like this:
310+
1. When the container installation is complete, the last lines of output should look like this:
311311
312312
```
313313
...
314314
...
315-
...
316-
[19:53:14.113] INFO (166): Server listening at http://127.0.0.1:4000
317-
[19:53:14.113] INFO (166): Server listening at http://172.23.0.3:4000
318-
[19:53:14.113] INFO (166): Server listening at http://172.20.0.2:4000
319-
[19:53:14.113] INFO (166): Server listening at http://172.19.0.3:4000
320-
[19:53:14.113] INFO (166): Server listening at http://172.21.0.3:4000
321-
[19:53:14.113] INFO (166): Server listening at http://172.22.0.4:4000
315+
{"outcome":"success","containerId":"81306766f2aeeb851c8ebb844702d39ad2adc09419508b736ef2ee5a03eb8e34","composeProjectName":"talawa","remoteUser":"talawa","remoteWorkspaceFolder":"/home/talawa/api"}
322316
```
323317
324318
All done!
325319
326-
#### CLI Shutdown (Development)
320+
#### CLI Startup (Development)
327321
328-
Use the command `docker compose` command to cleanly shutdown the dev container
322+
After a successful installation, use these commands to start the dev container.
329323
330-
```
331-
docker compose down
332-
```
324+
1. To run in attached Mode
333325
334-
#### CLI Startup (Development)
326+
```
327+
docker exec talawa-api-1 /bin/bash -c 'pnpm run start_development_server'
328+
```
335329
336-
After a successful installation, use these commands in sequence to start the dev container.
330+
2. To run in detached Mode
331+
332+
```
333+
docker exec talawa-api-1 /bin/bash -c 'nohup pnpm run start_development_server > /dev/null 2>&1 &'
334+
```
335+
336+
#### CLI Shutdown (Development)
337+
338+
Use the command `docker compose` command to cleanly shut down the dev container
337339
338340
```
339-
devcontainer build --workspace-folder .
340-
devcontainer up --workspace-folder .
341+
docker compose down
341342
```
342343
343344
#### Importing Sample Data

0 commit comments

Comments
 (0)