feat: update docker configuration#26
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds containerization artifacts to run the Node service via Docker (and docker-compose), updating the base image and runtime defaults.
Changes:
- Introduces
docker-compose.ymlfor local/prod container orchestration (ports, volumes, env, memory limit). - Updates
Dockerfileto Node 22 (bookworm-slim), installs OS deps, changes exposed port, and tweaks npm install + Node startup args. - Adds
.dockerignoreto shrink build context.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| docker-compose.yml | Defines a moon-bot service with port mapping, bind mounts, env, and memory limit. |
| Dockerfile | Updates base image, dependency install, npm install behavior, exposed port, and startup command. |
| .dockerignore | Excludes common local artifacts (and Docker-related files) from the build context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| EXPOSE 8080 | ||
|
|
||
| CMD ["node", "index.js"] No newline at end of file | ||
| CMD ["node", "index.js", "--max-old-space-size=1024"] No newline at end of file |
Comment on lines
5
to
+11
| RUN apt-get update && \ | ||
| apt-get install -y \ | ||
| ffmpeg \ | ||
| imagemagick \ | ||
| webp && \ | ||
| apt-get upgrade -y && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
| apt-get install -y \ | ||
| ffmpeg \ | ||
| imagemagick \ | ||
| webp && \ | ||
| apt-get upgrade -y && \ | ||
| rm -rf /var/lib/apt/lists/* |
Comment on lines
+13
to
+15
| COPY package.json package-lock.json* ./ | ||
|
|
||
| RUN npm install | ||
| RUN npm install --production |
Comment on lines
+7
to
+9
| volumes: | ||
| - .:/app | ||
| - /app/node_modules |
| mem_limit: 1g | ||
| restart: unless-stopped | ||
| environment: | ||
| - NODE_ENV=production |
| volumes: | ||
| - .:/app | ||
| - /app/node_modules | ||
| mem_limit: 1g |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
update docker configuration to make it easier for people who are used to deploying with docker
❤