Skip to content

Conversation

@pablohashescobar
Copy link
Member

@pablohashescobar pablohashescobar commented Jul 3, 2025

Description

  • Changed references from 'apiserver' to 'apps/server' in Docker configurations and environment setup.
  • Updated contributing documentation to reflect the new service structure.
  • Adjusted setup script to accommodate the new directory layout.
  • Removed obsolete files related to the previous structure.

Type of Change

  • Code refactoring
  • Documentation update

Test Scenarios

  • test all docker builds and local dev setup

References

Summary by CodeRabbit

  • Chores
    • Updated all references from the old backend directory to the new apps/server path across configuration, Docker, and setup files.
    • Removed deployment and runtime files related to Heroku and Procfile-based process management.
    • Improved documentation for environment setup, contributing guidelines, and environment variables, including new RabbitMQ and authentication options.
    • Enhanced formatting and clarity in documentation for better readability.
…d documentation

- Changed references from 'apiserver' to 'apps/server' in Docker configurations and environment setup.
- Updated contributing documentation to reflect the new service structure.
- Adjusted setup script to accommodate the new directory layout.
- Removed obsolete files related to the previous structure.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 3, 2025

Walkthrough

The changes update the project structure by renaming references from apiserver to apps/server across configuration, documentation, scripts, and Docker-related files. Several files specific to deployment (such as Procfile and heroku.yml) were removed, and environment variable documentation was revised. No application logic or code exports were altered.

Changes

File(s) Change Summary
.github/workflows/build-test-pull-request.yml Renamed lint job and updated lint/install paths from apiserver to apps/server.
CONTRIBUTING.md, ENV_SETUP.md Updated documentation for directory paths, clarified instructions, and improved formatting.
aio/Dockerfile-app, deploy/selfhost/build.yml, docker-compose.yml, docker-compose-local.yml Changed build contexts, volume mounts, and env file paths from apiserver to apps/server.
apps/server/Procfile, apps/server/runtime.txt, heroku.yml Deleted deployment-specific files (Procfile, runtime.txt, heroku.yml).
setup.sh Updated service names, env file paths, and key generation logic to use apps/server.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Script as setup.sh
    participant EnvFile as apps/server/.env

    Dev->>Script: Run setup.sh
    Script->>EnvFile: Check for .env file existence
    alt .env missing
        Script->>EnvFile: Copy .env.example to .env
    end
    Script->>EnvFile: Check for SECRET_KEY
    alt SECRET_KEY missing
        Script->>EnvFile: Generate and append SECRET_KEY
    end
    Script-->>Dev: Output success message with new path
Loading

Possibly related PRs

  • makeplane/plane#7323: Updates Docker build contexts and workflow paths from apiserver to apps/server in a similar directory restructure.
  • makeplane/plane#6758: Modifies setup.sh for improved error handling and user feedback, overlapping with this PR's changes to service naming and paths.

Suggested reviewers

  • sriramveeraghanta

Poem

Hopping through folders, the rabbit did find,
Paths once called "apiserver" now left behind.
With scripts and compose, and docs all aligned,
The warren is tidy, the configs refined.
🐇✨
"Onward to server!" the bunny declared—
A project well-groomed and perfectly prepared!

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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
Contributor

@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

🔭 Outside diff range comments (2)
docker-compose-local.yml (1)

19-25: plane-mq still consumes the wrong env file

env_file: - .env was not updated during the refactor, but all RABBITMQ_* variables now reside in ./apps/server/.env.
See ENV_SETUP.md lines 79-85.
Container boot will therefore miss its credentials. Point to the correct file or relocate the variables.

setup.sh (1)

63-78: Avoid duplicating SECRET_KEY entries

The script blindly appends a new SECRET_KEY every run. Re-running setup.sh will accumulate keys and Django will read only the first one, confusing future debugging.

Guard with a grep:

-if [ -f "./apps/server/.env" ]; then
+if [ -f "./apps/server/.env" ]; then
+    if ! grep -q '^SECRET_KEY=' ./apps/server/.env; then
         echo -e "SECRET_KEY=\"$SECRET_KEY\"" >> ./apps/server/.env
         echo -e "${GREEN}✓${NC} Added SECRET_KEY to apps/server/.env"
+    else
+        echo -e "${BLUE}i${NC} SECRET_KEY already present in apps/server/.env"
+    fi
🧹 Nitpick comments (5)
CONTRIBUTING.md (1)

186-202: Fix markdown-lint warning by using fenced code blocks

markdownlint (MD046) still reports “indented” code blocks around these lines. Replace the four-space-indented blocks with fenced blocks (```ts / ```) to silence CI:

-        // types/language.ts
-        export type TLanguage = "en" | "fr" | "your-lang";
+```typescript
+// types/language.ts
+export type TLanguage = "en" | "fr" | "your-lang";
+```

Repeat for the other two indented snippets.

aio/Dockerfile-app (1)

73-85: Path updates are correct but you can collapse COPY layers

All COPY instructions were updated to apps/server, 👍.
To reduce image layer count and leverage Docker cache you could merge them:

-COPY apps/server/requirements.txt ./api/
-COPY apps/server/requirements ./api/requirements
-
-COPY apps/server/manage.py ./api/manage.py
-COPY apps/server/plane ./api/plane/
-COPY apps/server/templates ./api/templates/
-
-COPY apps/server/bin ./api/bin/
+COPY apps/server/ \
+     ./api/ \
+     --chmod=0755

Not mandatory, but it speeds up incremental builds.

.github/workflows/build-test-pull-request.yml (1)

18-21: Label says “Install Pylint” but installs Ruff

Rename the step for clarity:

-      - name: Install Pylint
+      - name: Install Ruff

Purely cosmetic but avoids confusion for maintainers reading job logs.

ENV_SETUP.md (2)

31-33: Remove leftover deprecated variable to avoid confusion

DOCKERIZED=1 is still documented here even though the comment marks it as deprecated and the rest of the refactor explicitly removes any need for it. Leaving it in the sample root .env encourages cargo-cult copy-pasting and increases the number of divergent configuration states we must support.
Recommend deleting it entirely (or moving it to a historical changelog section).


86-90: Avoid committing real-looking secrets

The sample shows a concrete SECRET_KEY value. Even if it’s only an example, downstream users (and automated scripts) tend to reuse it, which defeats the purpose of the key.
Prefer a placeholder such as CHANGE_ME or instruct users to run setup.sh to generate a unique key instead.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6f27ec0 and 54ca32a.

📒 Files selected for processing (11)
  • .github/workflows/build-test-pull-request.yml (2 hunks)
  • CONTRIBUTING.md (6 hunks)
  • ENV_SETUP.md (2 hunks)
  • aio/Dockerfile-app (1 hunks)
  • apps/server/Procfile (0 hunks)
  • apps/server/runtime.txt (0 hunks)
  • deploy/selfhost/build.yml (1 hunks)
  • docker-compose-local.yml (2 hunks)
  • docker-compose.yml (3 hunks)
  • heroku.yml (0 hunks)
  • setup.sh (2 hunks)
💤 Files with no reviewable changes (3)
  • apps/server/runtime.txt
  • heroku.yml
  • apps/server/Procfile
🧰 Additional context used
🧠 Learnings (1)
CONTRIBUTING.md (2)
Learnt from: janreges
PR: makeplane/plane#6743
File: packages/i18n/src/store/index.ts:160-161
Timestamp: 2025-03-11T19:42:41.769Z
Learning: In the Plane project, the file 'packages/i18n/src/store/index.ts' already includes support for Polish language translations with the case "pl".
Learnt from: vamsikrishnamathala
PR: makeplane/plane#7092
File: web/core/components/issues/issue-detail-widgets/sub-issues/issues-list/root.tsx:109-113
Timestamp: 2025-05-22T11:21:49.370Z
Learning: Both translation keys "sub_work_item.empty_state.list_filters.action" and "sub_work_item.empty_state.sub_list_filters.action" have identical values across all language files in the Plane project, so they can be used interchangeably.
🪛 markdownlint-cli2 (0.17.2)
CONTRIBUTING.md

189-189: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)


197-197: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)


215-215: Code block style
Expected: fenced; Actual: indented

(MD046, code-block-style)

🔇 Additional comments (4)
CONTRIBUTING.md (1)

51-52: Backend path reference corrected – looks good

The switch from apiserver to apps/server aligns with the new directory layout used throughout the PR.

docker-compose.yml (1)

40-52: API service adjustments checked

The context and env-file updates to apps/server are consistent with the repo restructure, and the compose file sits at repo root so the new relative paths resolve correctly.

docker-compose-local.yml (2)

125-137: Path updates look consistent

Build context, volume mounts and env_file paths were correctly switched from apiserver to apps/server.
No functional concerns here.

Also applies to: 145-158, 165-177, 183-195


195-196: Migrator now sources the root .env only

Unlike the other backend services, migrator was changed to read the root .env.
Check that every setting it needs (e.g. SECRET_KEY, RABBITMQ_*, any Django-specific toggles) is present there; otherwise migrations may fail in CI/CD while working locally.

@sriramveeraghanta sriramveeraghanta merged commit 805cfed into preview Jul 3, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the fix-backend-docker-builds branch July 3, 2025 13:12
@coderabbitai coderabbitai bot mentioned this pull request Jul 4, 2025
1 task
lifeiscontent pushed a commit that referenced this pull request Aug 18, 2025
…d documentation (#7333)

- Changed references from 'apiserver' to 'apps/server' in Docker configurations and environment setup.
- Updated contributing documentation to reflect the new service structure.
- Adjusted setup script to accommodate the new directory layout.
- Removed obsolete files related to the previous structure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants