[INFRA-213] Fix aio dockerfile with new file structure#7427
[INFRA-213] Fix aio dockerfile with new file structure#7427sriramveeraghanta merged 2 commits intopreviewfrom
Conversation
WalkthroughThis change updates the directory paths in both the Dockerfile and the supervisor configuration to match a new structure for the web, space, and admin components. Cache cleanup and Node.js server start commands now target the updated Changes
Sequence Diagram(s)sequenceDiagram
participant Supervisor
participant WebServer
participant SpaceServer
participant AdminServer
participant LiveServer
Supervisor->>WebServer: Start /app/web/apps/web/server.js
Supervisor->>SpaceServer: Start /app/space/apps/space/server.js
Supervisor->>AdminServer: Start /app/admin/apps/admin/server.js
Supervisor->>LiveServer: Start /app/live/server.js
Possibly related PRs
Suggested labels
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
Pull Request Linked with Plane Work Items
Comment Automatically Generated by Plane |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (4)
deployments/aio/community/Dockerfile (1)
39-41: Generalise cache-cleanup to avoid hard-coding every app pathHard-coding each
.next/cachelocation means the Dockerfile needs edits every time a new Next.js package is added or paths shift again.-RUN rm -rf /app/web/apps/web/.next/cache && \ - rm -rf /app/space/apps/space/.next/cache && \ - rm -rf /app/admin/apps/admin/.next/cache +RUN find /app -type d -path '*/.next/cache' -prune -exec rm -rf {} +A single
findkeeps the image lean and future-proof.deployments/aio/community/supervisor.conf (3)
20-22: Drop the unnecessarysh -cwrapperSupervisor can invoke Node directly:
command=node /app/web/apps/web/server.jsRemoving the shell layer gives one fewer PID and cleaner signal handling.
32-34: Align style across programs
space(andadmin) use absolute paths without adirectory=…stanza, whileliverelies ondirectory+ relative path. Pick one convention for readability and easier debugging.
44-46: Same consistency point applies hereConsider using either
directory=/app/admin+command=node server.js
or the absolute-path pattern used above.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
deployments/aio/community/Dockerfile(1 hunks)deployments/aio/community/supervisor.conf(4 hunks)
🔇 Additional comments (1)
deployments/aio/community/Dockerfile (1)
39-41: Verify whether/app/liveneeds the same cleanupYou copy
live-imgbut do not clear a/app/live/.../.next/cachedirectory.
If the live package still uses Next.js this leaves useless artefacts in the final layer.
| directory=/app/live | ||
| command=sh -c "node live/dist/start.js live" | ||
| command=sh -c "node live/server.js" | ||
| autostart=true |
There was a problem hiding this comment.
Path very likely wrong – duplicated live/ segment
With directory=/app/live, node live/server.js resolves to /app/live/live/server.js, which probably does not exist.
-command=sh -c "node live/server.js"
+command=sh -c "node server.js"Fix before this hits production.
📝 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.
| directory=/app/live | |
| command=sh -c "node live/dist/start.js live" | |
| command=sh -c "node live/server.js" | |
| autostart=true | |
| directory=/app/live | |
| command=sh -c "node server.js" | |
| autostart=true |
🤖 Prompt for AI Agents
In deployments/aio/community/supervisor.conf around lines 99 to 101, the command
path includes a duplicated 'live/' segment causing it to resolve incorrectly to
/app/live/live/server.js. To fix this, update the command to run 'node
server.js' instead of 'node live/server.js' so it correctly references the file
relative to the specified directory /app/live.
* fix: update paths in Dockerfile and supervisor.conf for application directories * fix: update live command in supervisor.conf to use server.js
Description
Type of Change
Summary by CodeRabbit