Skip to content

Updated installation documentation #3097

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

Conversation

palisadoes
Copy link
Contributor

@palisadoes palisadoes commented Jan 30, 2025

Updated installation documentation

Summary by CodeRabbit

  • Documentation

    • Updated README.md with improved image paths and formatting
    • Enhanced installation documentation with detailed Linux development environment setup instructions
    • Added new CLI-based setup guide for developers
  • Dependencies

    • Added @devcontainers/cli version 0.73.0 to project dependencies

@palisadoes palisadoes added the ignore-sensitive-files-pr The contributor has a legitimate reason for editiing protected files label Jan 30, 2025
Copy link

coderabbitai bot commented Jan 30, 2025

Walkthrough

This pull request involves documentation and configuration updates across multiple files. The changes primarily focus on improving the README.md file's formatting, updating the installation documentation with more detailed setup instructions for Linux systems, and adding a new CLI-related dependency in the package.json file. The modifications aim to enhance documentation clarity and provide more comprehensive development environment setup guidance.

Changes

File Change Summary
README.md - Updated logo image path
- Adjusted formatting in Table of Contents and list indentations
docs/docs/docs/getting-started/installation.md - Added new "Using the CLI" subsection for Linux development setup
- Renamed "IDE Setup" to "Using the VScode IDE"
- Updated .env file creation instructions
package.json - Added new dependency @devcontainers/[email protected]

Possibly related PRs

Suggested labels

ignore-sensitive-files-pr


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Our Pull Request Approval Process

Thanks for contributing!

Testing Your Code

Remember, your PRs won't be reviewed until these criteria are met:

  1. We don't merge PRs with poor code quality.
    1. Follow coding best practices such that CodeRabbit.ai approves your PR.
  2. We don't merge PRs with failed tests.
    1. When tests fail, click on the Details link to learn more.
    2. Write sufficient tests for your changes (CodeCov Patch Test). Your testing level must be better than the target threshold of the repository
    3. Tests may fail if you edit sensitive files. Ask to add the ignore-sensitive-files-pr label if the edits are necessary.
  3. We cannot merge PRs with conflicting files. These must be fixed.

Our policies make our code better.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 526b51e and 6fa16c1.

⛔ Files ignored due to path filters (3)
  • docs/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • docs/static/img/markdown/misc/talawa-logo-lite-200x200.png is excluded by !**/*.png
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • README.md (3 hunks)
  • docs/docs/docs/getting-started/installation.md (2 hunks)
  • package.json (1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/docs/docs/getting-started/installation.md

[style] ~244-~244: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... the docker group on your next login. You don't have to logout, just start anothe...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[misspelling] ~244-~244: Did you mean the verb “log out” instead of the noun ‘logout’?
Context: ...p on your next login. You don't have to logout, just start another session on the CLI ...

(LOG_IN)

🪛 markdownlint-cli2 (0.17.2)
docs/docs/docs/getting-started/installation.md

205-205: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


209-209: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


218-218: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


223-223: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


225-225: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


227-227: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


229-229: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


231-231: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


233-233: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


235-235: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


237-237: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


239-239: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


241-241: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


241-241: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


243-243: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


245-245: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


245-245: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


247-247: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


249-249: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


249-249: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


251-251: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


253-253: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


253-253: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)


255-255: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyse Code With CodeQL (typescript)
🔇 Additional comments (5)
README.md (2)

5-5: LGTM! Image path updated correctly.

The image path has been updated to reflect the new directory structure.


31-34: LGTM! Documentation section formatting improved.

The formatting changes in the Table of Contents and Documentation sections enhance readability.

Also applies to: 50-54

package.json (1)

7-7: LGTM! Appropriate dependency added for CLI setup.

The addition of @devcontainers/cli aligns with the new CLI-based setup instructions.

docs/docs/docs/getting-started/installation.md (2)

203-209: LGTM! Clear PostgreSQL installation steps.

The PostgreSQL installation steps are accurate and well-documented.

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

205-205: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


209-209: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


232-235: Verify PostgreSQL host configuration.

The instruction to set API_POSTGRES_HOST=localhost needs verification to ensure it works with both local and container-based setups.

✅ Verification successful

PostgreSQL host configuration is correctly documented

Setting API_POSTGRES_HOST=localhost is valid as it works for both scenarios:

  • Local development: PostgreSQL container ports are mapped to localhost
  • Container-based setup: Docker compose handles the networking appropriately
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if PostgreSQL is accessible on localhost
pg_isready -h localhost -p 5432

# Verify if the connection details work
PGPASSWORD=password psql -h localhost -U talawa -d talawa -c "\conninfo"

Length of output: 306


Script:

#!/bin/bash
# Search for Docker-related files
echo "=== Docker Files ==="
fd -e dockerfile -e yml -e yaml | grep -i docker

# Search for environment variable documentation and configuration
echo -e "\n=== Environment Config Files ==="
fd -e env

# Search for PostgreSQL host configuration in documentation
echo -e "\n=== PostgreSQL Host Documentation ==="
rg -i "postgres.*host|host.*postgres" --type md

Length of output: 5310


Script:

#!/bin/bash
# Check Docker compose files for PostgreSQL configuration
echo "=== Docker Compose PostgreSQL Config ==="
cat docker/compose.devcontainer.yaml docker/compose.testing.yaml

Length of output: 11731

🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

233-233: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


235-235: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

Comment on lines +241 to +247
```
sudo usermod -a -G docker $USER
```
1. You will only become a part of the `docker` group on your next login. You don't have to logout, just start another session on the CLI using the `su` command.
```
sudo su $USER -
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Fix wording and add blank lines around code blocks.

The text contains repetitive sentence beginnings and incorrect usage of "logout" vs "log out".

-You will only become a part of the `docker` group on your next login. You don't have to logout, just start another session on the CLI using the `su` command.
+The changes will take effect on your next login. However, you don't need to log out - simply start another session on the CLI using the `su` command.

   ```bash
   sudo su $USER -

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 LanguageTool</summary>

[style] ~244-~244: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... the `docker` group on your next login. You don't have to logout, just start anothe...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

---

[misspelling] ~244-~244: Did you mean the verb “log out” instead of the noun ‘logout’?
Context: ...p on your next login. You don't have to logout, just start another session on the CLI ...

(LOG_IN)

</details>
<details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

241-241: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

---

241-241: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

---

243-243: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

---

245-245: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

---

245-245: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

---

247-247: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit -->

Comment on lines +205 to +239
```bash
sudo apt-get -y install postgresql postgresql-contrib
sudo systemctl enable postgresql.service
sudo systemctl start postgresql.service
```
1. Connect to the PostgreSQL CLI

```bash
sudo -u postgres psql

```

1. Create the database, grant permissions then exit
```sql
CREATE DATABASE talawa;
CREATE USER talawa WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE talawa TO talawa;
GRANT ALL ON SCHEMA public TO talawa;
```
1. Exit the PostgreSQL CLI
```bash
exit
```
1. Create the `.env` file by copying the template from the `envFiles/` directory
```bash
cp envFiles/.env.devcontainer .env
```
1. Change the `.env` file's `API_POSTGRES_HOST` parameter to `localhost`.
```ini
API_POSTGRES_HOST=localhost
```
1. Install the packages
```bash
pnpm install
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Add language identifiers to code blocks.

Several code blocks are missing language identifiers, which affects syntax highlighting.

Add appropriate language identifiers to code blocks:

  • Line 242: bash
  • Line 246: bash
  • Line 250: bash
  • Line 254: json
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

205-205: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


209-209: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


218-218: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


223-223: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


225-225: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


227-227: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


229-229: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


231-231: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


233-233: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


235-235: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


237-237: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


239-239: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

Comment on lines +217 to +223
1. Create the database, grant permissions then exit
```sql
CREATE DATABASE talawa;
CREATE USER talawa WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE talawa TO talawa;
GRANT ALL ON SCHEMA public TO talawa;
```
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add schema creation step for PostgreSQL setup.

The PostgreSQL setup should include creating the schema explicitly before granting permissions.

 CREATE DATABASE talawa;
 CREATE USER talawa WITH PASSWORD 'password';
 GRANT ALL PRIVILEGES ON DATABASE talawa TO talawa;
+\c talawa
+CREATE SCHEMA IF NOT EXISTS public;
 GRANT ALL ON SCHEMA public TO talawa;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
1. Create the database, grant permissions then exit
```sql
CREATE DATABASE talawa;
CREATE USER talawa WITH PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE talawa TO talawa;
GRANT ALL ON SCHEMA public TO talawa;
```
1. Create the database, grant permissions then exit
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

218-218: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)


223-223: Fenced code blocks should be surrounded by blank lines
null

(MD031, blanks-around-fences)

@palisadoes palisadoes closed this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore-sensitive-files-pr The contributor has a legitimate reason for editiing protected files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant