Hi, I’m stuck on how to deploy my workflow. Any help is welcome
The issue
My goal is to import a cron workflow inside a docker container. At the moment the container is created by docker-compose, the workflow should start running. However, when run docker-compose up n8n (n8n as my service name), it throws the following error and abort container execution with exit code 0.
Error message:
[root@root platform]# docker-compose up n8n
Recreating platform_n8n_1
Attaching to platform_n8n_1
n8n_1 | su-exec: n8n update:workflow --all --active=true: No such file or directory
platform_n8n_1 exited with code 0
When I build the docker container, “Successfully imported 1 workflow.” message is shown, which is expected. But I don’t get what is this missing file or directory when executing workflow
Current setup
Dockerfile
# set base image
FROM n8nio/n8n
# define working directory
WORKDIR /etc/n8n
# copy workflows
COPY ./ ./
# import workflows from folder
RUN n8n import:workflow --separate --input=./workflows
docker-compose.yml
n8n:
image: [builded-image-here]
volumes:
- ./data/n8n/.n8n:/home/node/.n8n
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "5678:5678"
command:
- n8n update:workflow --all --active=true
environment:
- DB_TYPE=postgresdb
- DB_POSTGRESDB_DATABASE=*****
- DB_POSTGRESDB_HOST=*****
- DB_POSTGRESDB_PORT=5432
- DB_POSTGRESDB_USER=*****
- DB_POSTGRESDB_SCHEMA=public
- DB_POSTGRESDB_PASSWORD=*****
- DB_TABLE_PREFIX=n8n_
- MYSQL_DATABASE=*****
- MYSQL_HOST=*****
- MYSQL_PORT=3306
- MYSQL_USER=*****
- MYSQL_PASSWORD=*****
- N8N_ENCRYPTION_KEY=*****************
restart: always
Information on your n8n setup
Info
- n8n version: n8n@0.189.0
- Database: Postgres, but using a MySql node
- Running n8n via: Docker