Hello.
I want to try the new python native mode, so I made a docker compose to try it locally.
My problem is that for some reason the code is running but stays in “executing code” forever. I don’t know if my task runner has a problem or something if its my docker compose so I want to ask for help to verify it. Can someone help me with the docker compose?
THX!
volumes:
db_storage:
n8n_storage:
services:
postgres:
image: postgres:16
restart: always
environment:
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DB
- POSTGRES_NON_ROOT_USER
- POSTGRES_NON_ROOT_PASSWORD
volumes:
- db_storage:/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
networks:
- n8n_net
n8n:
image: n8nio/n8n:1.111.0
restart: always
container_name: n8n-main
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
- DB_POSTGRESDB_USER=${POSTGRES_USER}
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
- N8N_RUNNERS_ENABLED=true
- N8N_NATIVE_PYTHON_RUNNER=true
- N8N_RUNNERS_MODE=internal
- N8N_RUNNERS_AUTH_TOKEN=test
- N8N_LOG_LEVEL=debug
ports:
- 5678:5678
expose:
- "5679"
links:
- postgres
networks:
- n8n_net
volumes:
- n8n_storage:/home/node/.n8n
depends_on:
postgres:
condition: service_healthy
task-runners:
image: n8nio/runners:1.111.0
container_name: n8n-runners
environment:
- N8N_RUNNERS_AUTH_TOKEN=test
- N8N_RUNNERS_TASK_BROKER_URI=http://n8n-main:5679
- NODE_FUNCTION_ALLOW_BUILTIN=*
- NODE_FUNCTION_ALLOW_EXTERNAL=*
- N8N_RUNNERS_STDLIB_ALLOW=*
- N8N_RUNNERS_EXTERNAL_ALLOW=*
- N8N_RUNNERS_LAUNCHER_LOG_LEVEL=debug
expose:
- "5680"
depends_on:
- n8n
networks:
- n8n_net
networks:
n8n_net:
driver: bridge
Information on your n8n setup
- n8n version: 1.111.0
- Database (default: SQLite): Postgres
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Windows (no WSL)