-
Notifications
You must be signed in to change notification settings - Fork 1
Update docker-compose.prod.yml to enhance n8n service configuration #82
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
- Added `restart: unless-stopped` to the n8n service for improved reliability. - Introduced environment variables `N8N_DEFAULT_BINARY_DATA_MODE` and `N8N_BINARY_DATA_STORAGE_PATH` to configure binary data handling. - Cleaned up unnecessary whitespace in the configuration file for better readability. These changes enhance the stability and functionality of the n8n service in the production environment.
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches🧪 Generate unit tests
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. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
🔍 Vulnerabilities of
|
| digest | sha256:da30eca7154c7c4cb2616e31f7411021ea9146d5b15c68adf2a57df4c52b164c |
| vulnerabilities | |
| platform | linux/amd64 |
| size | 218 MB |
| packages | 358 |
📦 Base Image alpine:3
| also known as |
|
| digest | sha256:1c4eef651f65e2f7daee7ee785882ac164b02b78fb74503052a26dc061c90474 |
| vulnerabilities |
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
| ||||||||||||
Description
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
docker-compose.prod.yml (1)
3-4: Considerrestart: alwaysfor critical production services
restart: unless-stoppedis usually fine, but note that it will not restart the container if it fails to start at boot time and the admin never callsdocker start. If n8n is business-critical you may wantrestart: always, which makes the engine attempt restarts on daemon start as well.Confirm the team’s operational preference and update if necessary.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docker-compose.prod.yml(3 hunks)
🧰 Additional context used
🧠 Learnings (10)
📓 Common learnings
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-28T16:44:50.073Z
Learning: Applies to Dockerfile.n8n : Use Dockerfile.n8n for custom n8n image configuration.
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/docker-configuration.mdc:0-0
Timestamp: 2025-07-28T16:44:24.081Z
Learning: Applies to docker-compose.yml : Services must communicate over an internal Docker network with only the specified ports exposed: n8n (5678), Temporal (7233), Temporal UI (8080), PostgreSQL (5432), and OpenSearch (9200)
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/pull-request-rules.mdc:0-0
Timestamp: 2025-07-28T16:45:05.154Z
Learning: Analyze the changes to understand the purpose and impact before submitting a pull request
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/docker-configuration.mdc:0-0
Timestamp: 2025-07-28T16:44:24.081Z
Learning: Applies to docker-compose.yml : All service configurations, including service dependencies, volume mounts, network configuration, environment variables, and port mappings, must be defined in docker-compose.yml
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/docker-configuration.mdc:0-0
Timestamp: 2025-07-28T16:44:24.081Z
Learning: Applies to Dockerfile.{n8n,temporal} : Custom Docker images must be defined using Dockerfile.n8n and Dockerfile.temporal, each extending their respective official base images with custom configurations
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-28T16:44:50.073Z
Learning: Applies to docker-compose.yml : The repository must include a docker-compose.yml file as the main service orchestration configuration.
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/docker-configuration.mdc:0-0
Timestamp: 2025-07-28T16:44:24.081Z
Learning: Applies to volumes/**/* : All service data must be persisted in Docker volumes mapped to the local volumes/ directory, such as ./volumes/n8n_data, ./volumes/opensearch-data, and ./volumes/postgresql-data
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/service-configuration.mdc:0-0
Timestamp: 2025-06-24T12:29:29.869Z
Learning: When setting up a service environment managed by Docker Compose, always ensure that required volume directories are created (e.g., via a setup script) before starting services to prevent mount errors.
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-28T16:44:50.073Z
Learning: The project architecture must include interconnected services: n8n, Temporal Server, Temporal UI, PostgreSQL, and OpenSearch, each running on their specified ports.
Learnt from: anatolyshipitz
PR: speedandfunction/automatization#34
File: workers/main/src/workflows/financial/FinancialReportFormatter.ts:3-7
Timestamp: 2025-05-30T17:57:21.010Z
Learning: User anatolyshipitz prefers to keep code implementations simple during early development stages rather than adding comprehensive error handling and validation. They consider extensive type annotations and error handling "redundant" when focusing on core functionality and testing.
📚 Learning: applies to docker-compose.yml : services must communicate over an internal docker network with only ...
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/docker-configuration.mdc:0-0
Timestamp: 2025-07-28T16:44:24.081Z
Learning: Applies to docker-compose.yml : Services must communicate over an internal Docker network with only the specified ports exposed: n8n (5678), Temporal (7233), Temporal UI (8080), PostgreSQL (5432), and OpenSearch (9200)
Applied to files:
docker-compose.prod.yml
📚 Learning: applies to docker-compose.yml : all service configurations, including service dependencies, volume m...
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/docker-configuration.mdc:0-0
Timestamp: 2025-07-28T16:44:24.081Z
Learning: Applies to docker-compose.yml : All service configurations, including service dependencies, volume mounts, network configuration, environment variables, and port mappings, must be defined in docker-compose.yml
Applied to files:
docker-compose.prod.yml
📚 Learning: applies to dockerfile.n8n : use dockerfile.n8n for custom n8n image configuration....
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-28T16:44:50.073Z
Learning: Applies to Dockerfile.n8n : Use Dockerfile.n8n for custom n8n image configuration.
Applied to files:
docker-compose.prod.yml
📚 Learning: applies to volumes/**/* : all service data must be persisted in docker volumes mapped to the local v...
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/docker-configuration.mdc:0-0
Timestamp: 2025-07-28T16:44:24.081Z
Learning: Applies to volumes/**/* : All service data must be persisted in Docker volumes mapped to the local volumes/ directory, such as ./volumes/n8n_data, ./volumes/opensearch-data, and ./volumes/postgresql-data
Applied to files:
docker-compose.prod.yml
📚 Learning: applies to docker-compose.yml : the repository must include a docker-compose.yml file as the main se...
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-28T16:44:50.073Z
Learning: Applies to docker-compose.yml : The repository must include a docker-compose.yml file as the main service orchestration configuration.
Applied to files:
docker-compose.prod.yml
📚 Learning: applies to dockerfile.{n8n,temporal} : custom docker images must be defined using dockerfile.n8n and...
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/docker-configuration.mdc:0-0
Timestamp: 2025-07-28T16:44:24.081Z
Learning: Applies to Dockerfile.{n8n,temporal} : Custom Docker images must be defined using Dockerfile.n8n and Dockerfile.temporal, each extending their respective official base images with custom configurations
Applied to files:
docker-compose.prod.yml
📚 Learning: the project architecture must include interconnected services: n8n, temporal server, temporal ui, po...
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-28T16:44:50.073Z
Learning: The project architecture must include interconnected services: n8n, Temporal Server, Temporal UI, PostgreSQL, and OpenSearch, each running on their specified ports.
Applied to files:
docker-compose.prod.yml
📚 Learning: applies to volumes/{n8n_data,opensearch-data,postgresql-data}/ : persistent data for all services mu...
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-28T16:44:50.073Z
Learning: Applies to volumes/{n8n_data,opensearch-data,postgresql-data}/ : Persistent data for all services must be stored in the volumes/ directory, with subdirectories for n8n_data, opensearch-data, and postgresql-data.
Applied to files:
docker-compose.prod.yml
📚 Learning: applies to dockerfile.temporal : use dockerfile.temporal for custom temporal image configuration....
Learnt from: CR
PR: speedandfunction/automatization#0
File: .cursor/rules/project-structure.mdc:0-0
Timestamp: 2025-07-28T16:44:50.073Z
Learning: Applies to Dockerfile.temporal : Use Dockerfile.temporal for custom Temporal image configuration.
Applied to files:
docker-compose.prod.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Docker Security Scanning (n8n, Dockerfile.n8n, n8n-test:latest)
- GitHub Check: Service Availability Check
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
docker-compose.prod.yml (1)
23-24: Verify persistence path for binary data
N8N_BINARY_DATA_STORAGE_PATH=/data/n8n/binaryDatasits inside the host-bound volume declared at the bottom, but only if the n8n service mounts that volume into the same path inside the container (e.g.volumes: - n8n_data:/data/n8n). Please double-check the mount; a mismatch will dump binaries to the container layer and they’ll vanish on redeploy.
killev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved



restart: unless-stoppedto the n8n service for improved reliability.N8N_DEFAULT_BINARY_DATA_MODEandN8N_BINARY_DATA_STORAGE_PATHto configure binary data handling.Docs: https://docs.n8n.io/hosting/configuration/environment-variables/binary-data/
These changes enhance the stability and functionality of the n8n service in the production environment.