Giter VIP home page Giter VIP logo

n8n-heroku's Introduction

n8n-heroku

Docker Heroku

Deploy

[ Open Source Contributors feel free to maintain this repository ]

New method, just click, configure and get your n8n running. Also, now set app stack to container and simply connect this Github repo and deploy, heroku uses default configuration from app.json

default basic auth is user:pass

n8n(Nodemation) - Free and Open Workflow Automation Tool

This is a Heroku focused container implementation for the n8n Automation Tool. Just connect your fork to heroku and let it work as a charm!

Requirements

  • Heroku CLI

Setup

this is old setup guide not required now, connect this GitHub repo to heroku to autoconfigure. or click the above button to deploy without GitHub.

STEP 1: CHANGE your App Stack to container

you can change your app's stack using heroku cli, make sure you have heroku cli installed.

login into heroku account

heroku login

change app stack

heroku stack:set contaner --app APP_NAME

replace APP_NAME with your heroku app name

STEP 2: ADD Config Vars for enabling basic authentication (Optional)

It's recommended that you enable basic authentication when deployingn n8n on web. You need to set the following Environment Variables(Config Vars) in your App settings.

N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=SET_USERNAME
N8N_BASIC_AUTH_PASSWORD=SET_PASSWORD

Using filesystem/sqlite as storage will destroy any workflows on new builds/releases it it recommended to use mongodb or postgreSQL as the drivers are built into the code.

DB_TYPE=mongodb
DB_MONGODB_CONNECTION_URL=mongodb://MONGODB_USERNAME:MONGODB_PASSWORD@HOST:PORT/MONGODB_DATABASE

you will get the connection string in the heroku mongodb addon or any service you choose. using heroku addons is recommended as they auto configure ENV Variables for you. just copy MONGODB_URI to DB_MONGODB_CONNECTION_URL. that's it.

Same process is to be followed for using postgreSQL.

DB_TYPE=postgresdb
DB_POSTGRESDB_HOST=POSTGRES_HOST
DB_POSTGRESDB_PORT=POSTGRES_PORT
DB_POSTGRESDB_DATABASE=POSTGRES_DB
DB_POSTGRESDB_USER=POSTGRES_USER
DB_POSTGRESDB_PASSWORD=POSTGRES_PASSWORD

If some of your triggers depend on published app domain you may need to explicitly set url for yours n8n instance

WEBHOOK_URL=https://your-app.herokuapp.com

STEP 3: DONE! Now CONNECT GitHub repo and Deploy.

Using Container Registry

you can also deploy this project using container registry (requires aditional requirements installed). Just clone/download this repository on your local machine.

Additional Requirements (for building on local)

  • docker
  • docker-compose

Steps

cd into your project directory

cd n8n-heroku/

login into heroku account

heroku login

create heroku app

heroku create APP_NAME

change app stack

heroku stack:set container --app APP_NAME

set config vars(optional)

heroku config:set N8N_BASIC_AUTH_ACTIVE=true
heroku config:set N8N_BASIC_AUTH_USER=SET_USERNAME
heroku config:set N8N_BASIC_AUTH_PASSWORD=SET_PASSWORD

Login the container

heroku container:login

build and push container image to heroku

heroku container:push web --app APP_NAME

release new build

heroku container:release web --app APP_NAME

Maybe now you can specify which N8N version to install by Setting a Environment Variable N8N_VERSION or with a build time argument of the same. Not tested yet though, create an issue if it does't work. CI is passing so it is working correctly with default values.

Update - To set n8n version you can pass a argument when deploying using container registry

heroku container:push web --arg N8N_VERSION=0.60.0 --app APP_NAME

Sources

https://github.com/n8n-io/n8n

n8n-heroku's People

Contributors

8bitsarvesh avatar amitbend avatar kahrrza avatar lukeledet avatar m91michel avatar nennogabriel avatar nosovk avatar rduarte avatar sagararyal avatar sarveshpro avatar that-one-tom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

n8n-heroku's Issues

github trigger node complains about running on localhost

Hey!
Great project!

I tried to deploy n8n to heroku and importet my stuff. Everything went fine so far except that the github trigger node complains with the following message:

Problem running workflow
There was a problem running the workflow:
The Webhook can not work on "localhost". Please, either setup n8n on a custom domain or start with "--tunnel"!

Of course, I got the same issue when running my workflow locally and fixed it by running n8n start -tunnel but now that it runs on heroku I need to tell n8n about it's domain.
I tried adding 2 env vars called DOMAIN_NAME and SUBDOMAIN and used the herokuapp.com and my app-name as the subdomain as given in the heroku ui, but the error persists.
I wonder if you have an idea how to solve it.

Thank you!

App crashes after 4 Months of usage

No idea what's going on but here are the logs from Heroku.

2021-03-15T18:23:37.417085+00:00 app[web.1]: (node:14) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
2021-03-15T18:23:37.418295+00:00 app[web.1]: (node:14) UnhandledPromiseRejectionWarning: Error: There was an error: no pg_hba.conf entry for host "54.242.74.204", user "gqxgnkcvxivohc", database "dbm50ih9luriv0", SSL off
2021-03-15T18:23:37.418297+00:00 app[web.1]:     at Object.error (/usr/local/lib/node_modules/n8n/node_modules/@oclif/errors/lib/index.js:26:15)
2021-03-15T18:23:37.418297+00:00 app[web.1]:     at Start.error (/usr/local/lib/node_modules/n8n/node_modules/@oclif/command/lib/command.js:60:23)
2021-03-15T18:23:37.418298+00:00 app[web.1]:     at /usr/local/lib/node_modules/n8n/dist/commands/start.js:134:22
2021-03-15T18:23:37.418434+00:00 app[web.1]: (node:14) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
2021-03-15T18:23:37.558582+00:00 heroku[web.1]: Process exited with status 0
2021-03-15T18:23:37.648295+00:00 heroku[web.1]: State changed from starting to crashed
2021-03-15T18:24:30.793849+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/workflow" host=deviated-systems-n8n.herokuapp.com request_id=a17430ba-bedb-4697-89d9-2adf528fc657 fwd="98.194.35.14" dyno= connect= service= status=503 bytes= protocol=https
2021-03-15T18:24:31.873182+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=deviated-systems-n8n.herokuapp.com request_id=ece3577f-5918-44f9-a8ad-fecc98394d29 fwd="98.194.35.14" dyno= connect= service= status=503 bytes= protocol=https

How to update?

Hello!

First of all, thank you for your nice job, it's really a must-have.

I have deployed successfully with the Deploy on Heroku button after I forked your repo.

I have some other apps on Heroku and for those I use actions. (there are 2 actions, one for installation and, the second for update).

My question is that after I pull updates from upstream to my repo. How can I update the app easily on Heroku?

If I push a Deploy on Heroku its tries to start a new one, instead of updating the existing setup.

Sorry for this beginner question, but maybe it's also helpful for someone else too.

Get more node, trigger

I have installed n8n on heroku but It missing many Node like Gmail,....

How to fix it

Deploy with Heroku throws error

I am getting this error when I use the "deeply with Heroku" button. I am a newbie on Heroku. Can you please help?

2020-10-29T14:10:13.231789+00:00 app[web.1]: indentified DB in use postgreSQL
2020-10-29T14:10:15.255596+00:00 app[web.1]: UserSettings got generated and saved to: /data/.n8n/config
2020-10-29T14:10:17.664103+00:00 heroku[web.1]: Process exited with status 0
2020-10-29T14:10:17.704169+00:00 heroku[web.1]: State changed from starting to crashed
2020-10-29T14:11:33.220234+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=n8n-service.herokuapp.com request_id=53e04ef3-f526-4198-a638-f3647d7312c4 fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https
2020-10-29T14:11:37.275558+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=n8n-service.herokuapp.com request_id=64eb2462-dc86-427f-86c9-04759b8640cf fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https
2020-10-29T14:11:58.583151+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=n8n-service.herokuapp.com request_id=fd25af93-bcd2-4087-ab15-b825a9e245bb fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https
2020-10-29T14:12:00.702291+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=n8n-service.herokuapp.com request_id=cd7109b6-7793-4e4e-921b-24c34b9f585f fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https
2020-10-29T14:12:52.867403+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=n8n-service.herokuapp.com request_id=f3507cb4-582d-43d4-b3db-58a650481832 fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https
2020-10-29T14:12:55.363898+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=n8n-service.herokuapp.com request_id=ab60c37c-a956-45ef-aa1c-6890ae8714da fwd="103.5.134.34" dyno= connect= service= status=503 bytes= protocol=https

App doesnt start after setup

I've clicked the deploy button and deployed it as it was.

The deplyment was successful, but the app crashed at startup

Logs:
2020-04-30T15:46:38.688173+00:00 app[web.1]: indentified DB in use postgreSQL 2020-04-30T15:46:38.963195+00:00 app[web.1]: Error: Cannot find module 'request' 2020-04-30T15:46:38.963221+00:00 app[web.1]: Require stack: 2020-04-30T15:46:38.963236+00:00 app[web.1]: - /usr/local/lib/node_modules/n8n/node_modules/request-promise-native/lib/rp.js 2020-04-30T15:46:38.963242+00:00 app[web.1]: - /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/NodeExecuteFunctions.js 2020-04-30T15:46:38.963242+00:00 app[web.1]: - /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/index.js 2020-04-30T15:46:38.963243+00:00 app[web.1]: - /usr/local/lib/node_modules/n8n/dist/commands/start.js 2020-04-30T15:46:38.963243+00:00 app[web.1]: - /usr/local/lib/node_modules/n8n/node_modules/@oclif/config/lib/plugin.js 2020-04-30T15:46:38.963243+00:00 app[web.1]: - /usr/local/lib/node_modules/n8n/node_modules/@oclif/config/lib/config.js 2020-04-30T15:46:38.963244+00:00 app[web.1]: - /usr/local/lib/node_modules/n8n/node_modules/@oclif/config/lib/index.js 2020-04-30T15:46:38.963244+00:00 app[web.1]: - /usr/local/lib/node_modules/n8n/node_modules/@oclif/command/lib/command.js 2020-04-30T15:46:38.963244+00:00 app[web.1]: - /usr/local/lib/node_modules/n8n/node_modules/@oclif/command/lib/index.js 2020-04-30T15:46:38.963244+00:00 app[web.1]: - /usr/local/lib/node_modules/n8n/bin/n8n 2020-04-30T15:46:38.963245+00:00 app[web.1]: at /usr/local/lib/node_modules/n8n/node_modules/request-promise-native/lib/rp.js:8:12 2020-04-30T15:46:38.963250+00:00 app[web.1]: at module.exports (/usr/local/lib/node_modules/n8n/node_modules/stealthy-require/lib/index.js:62:23) 2020-04-30T15:46:38.963250+00:00 app[web.1]: at Object.<anonymous> (/usr/local/lib/node_modules/n8n/node_modules/request-promise-native/lib/rp.js:7:15)

Customize n8n

Hello,

I have made some local customizations to n8n, and I would like to deploy from my own repo instead of the n8n repo.

However, I am not quite sure how I should modify the Dockerfile to do so.

Any suggestions would be much appreciated. Thanks!

Can't deploy to Heroku: python (no such package):

Can't deploy to Heroku:

Following error in the log during deployment:

Step 5/9 : RUN apk --update add --virtual build-dependencies python build-base && npm_config_user=root npm install -g n8n@${N8N_VERSION} && apk del build-dependencies
---> Running in 28471aa3149c
ERROR: unable to select packages:
python (no such package):
required by: build-dependencies-20211027.192635[python]
The command '/bin/sh -c apk --update add --virtual build-dependencies python build-base && npm_config_user=root npm install -g n8n@${N8N_VERSION} && apk del build-dependencies' returned a non-zero code: 2

Dyno restarts

Doesn't dyno restarts effect the saved configuration? And is the free plan of database enough?

How to update this to the new n8n version

Does my n8n that I hosted on my Heroku using this repository will get updated automatically or do I need to update it manually. If I need to update it manually how to do it without losing my workflows.

Is this the latest N8N version

Hellom

I was wondering how up to date this is as I saw it on an old stackoverflow thread, will this let me easily (I am not a developer) install the latest N8N self host version on Heroku currently? Thanks

Install external library

It's possible to install external libraries in functions ? If so, how do you have a documentation or method to follow ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.