Amansoni7477030 commited on
Commit
7a21ded
·
verified ·
1 Parent(s): a4c8197

Create run.sh

Browse files
Files changed (1) hide show
  1. run.sh +26 -0
run.sh ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Start the PostgreSQL service
4
+ /usr/local/bin/docker-entrypoint.sh postgres &
5
+
6
+ # Check if the PostgreSQL service has started
7
+ echo "Waiting for PostgreSQL service to start..."
8
+ until pg_isready -h localhost; do
9
+ sleep 3
10
+ done
11
+ echo "PostgreSQL service has started!"
12
+
13
+ # Execute the database import script
14
+ echo "Running the database import script..."
15
+ ${WORKDIR}/import-db.sh
16
+
17
+ sleep 2
18
+
19
+ export N8N_ENCRYPTION_KEY="n8n8n8n"
20
+ # Allows usage of all built-in modules
21
+ export NODE_FUNCTION_ALLOW_BUILTIN=*
22
+ # Allow usage of external npm modules.
23
+ export NODE_FUNCTION_ALLOW_EXTERNAL=*
24
+
25
+ # Use absolute path to call n8n
26
+ exec n8n