n8n / run.sh
Amansoni7477030's picture
Create run.sh
7a21ded verified
raw
history blame
623 Bytes
#!/bin/bash
# Start the PostgreSQL service
/usr/local/bin/docker-entrypoint.sh postgres &
# Check if the PostgreSQL service has started
echo "Waiting for PostgreSQL service to start..."
until pg_isready -h localhost; do
sleep 3
done
echo "PostgreSQL service has started!"
# Execute the database import script
echo "Running the database import script..."
${WORKDIR}/import-db.sh
sleep 2
export N8N_ENCRYPTION_KEY="n8n8n8n"
# Allows usage of all built-in modules
export NODE_FUNCTION_ALLOW_BUILTIN=*
# Allow usage of external npm modules.
export NODE_FUNCTION_ALLOW_EXTERNAL=*
# Use absolute path to call n8n
exec n8n