Describe the problem/error/question
I would like to have two different URLs pointed toward n8n’s instance.
For example, Let’s say I have a setup where I can access n8n’s instance from n8n.example.com. But, when building a new workflow, I would like the Webhook node to have the URL api.example.com instead of n8n.example.com.
Is this possible?
Please share your workflow
Since this is a question about setting up the instance in Docker, I am sharing my Docker-Compose file here.
version: '3.8'
services:
postgres:
image: postgres:11
restart: always
container_name: n8n_db
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
volumes:
- /data/n8n/db:/var/lib/postgresql/data
- ./init-data.sh:/docker-entrypoint-initdb.d/init-data.sh
healthcheck:
test: ['CMD-SHELL', 'pg_isready -h localhost -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 5s
timeout: 5s
retries: 10
n8napp:
image: n8nio/n8n
restart: always
container_name: n8n_app
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_NON_ROOT_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_NON_ROOT_PASSWORD}
- EXECUTIONS_PROCESS=own
- EXECUTIONS_TIMEOUT=-1
- EXECUTIONS_TIMEOUT_MAX=3600
- GENERIC_TIMEZONE=Asia/Kolkata
- TZ=Asia/Kolkata
- N8N_EMAIL_MODE=smtp
- N8N_SMTP_HOST=smtp-relay.gmail.com
- N8N_SMTP_PORT=465
- N8N_SMTP_USER=myemailaddress
- N8N_SMTP_PASS=${SMTP_PASSWORD}
- N8N_SMTP_SENDER=myemailaddress
- N8N_SMTP_SSL=true
ports:
- 5678:5678
links:
- postgres
volumes:
- /data/n8n/app:/home/node/.n8n
command: /bin/sh -c "n8n start --tunnel"
depends_on:
postgres:
condition: service_healthy
I am trying to run the latest version of n8n with Postgres DB using Docker in Ubuntu 22.04 LTS.