Spaces:
Sleeping
Sleeping
File size: 891 Bytes
7a21ded 71c5386 da297f3 7a21ded |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
#!/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
# Print the container's IP address
CONTAINER_IP=$(hostname -I | awk '{print $1}')
echo "Container IP address: $CONTAINER_IP"
# Print the public IP address of the Docker host
PUBLIC_IP=$(curl -s https://api.ipify.org)
echo "Public IP address of Docker host: $PUBLIC_IP"
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 |