-
Notifications
You must be signed in to change notification settings - Fork 15
Added n8n to samples #474
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
base: main
Are you sure you want to change the base?
Added n8n to samples #474
Conversation
samples/n8n/compose.yml
Outdated
postgres: | ||
extends: | ||
file: compose.dev.yaml | ||
service: postgres | ||
|
||
n8n: | ||
extends: | ||
file: compose.dev.yaml | ||
service: n8n |
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.
@KevyVo extends relationship should be reversed: the compose.dev.yaml
file should extend the compose.yaml
file and modify things that are dev-specific.
samples/n8n/compose.yml
Outdated
file: compose.dev.yaml | ||
service: postgres | ||
|
||
n8n: |
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.
@KevyVo you referenced the external storage docs in the PR description, but I don't see it used here.
I'd recommend adding those env vars in here and then documenting any additional steps. Tigris Data is a free option we can point people to that offers s3-compatible storage.
samples/n8n/compose.yml
Outdated
depends_on: | ||
- postgres | ||
|
||
postgres: |
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.
Production compose.yaml
file should include the x-defang-postgres
extension.
samples/n8n/README.md
Outdated
|
||
[](ASK RAPH) | ||
|
||
This sample shows how to get a [n8n](https://n8n.io/) app up using PostgreSQL as a database and running with Defang. The original sample can be found [here](https://github.com/n8n-io/n8n-hosting/tree/main/docker-compose/withPostgres). The official n8n guide for setting up with PostgreSQL [here](https://docs.n8n.io/hosting/installation/server-setups/docker-compose/) does not work with Defang. To use the version compatible with Defang, please refer to this sample instead. |
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.
If we say it's not compatible with Defang, I think we should highlight why/what isn't compatible.
samples/n8n/README.md
Outdated
|
||
## Development | ||
|
||
**IMPORTANT:** But before you do that change the default users and passwords in the [`.env`](.env) file! |
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.
One awkward thing is that any .env
file we put here will be loaded when we run defang compose up
because the docker SDK will pick it up. Config vals should override them but I believe they won't be marked as missing if the .env
file exists. I'd recommend hard-coding in the development compose file for that reason.
I personally prefer if |
We had so many conversations about this and I used to push that idea, but we collectively agreed a long time ago that that was exactly what we wanted to avoid because it means passing an extra |
By popular require, n8n is added to the list of samples. Since we do not support volumes right now, all the volumes in the compose.dev.yaml will be used for only local development.
Here are some resources I used while developing this:
Samples Checklist
✅ All good!