Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detachable Server Execution #3315

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions docs/docs/docs/developer-resources/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
27 changes: 14 additions & 13 deletions docs/docs/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,12 @@ 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!
Expand All @@ -333,12 +327,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 > /dev/null 2>&1 &'
```

#### Importing Sample Data

Expand Down
Loading