-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathstart-dev.sh
More file actions
44 lines (34 loc) · 864 Bytes
/
start-dev.sh
File metadata and controls
44 lines (34 loc) · 864 Bytes
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
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# Start development setup
# Check if Docker is installed
if ! command -v docker &> /dev/null; then
echo "Docker is not installed. Please install Docker first."
exit 1
fi
# Check if Docker Compose is installed
if ! command -v docker-compose &> /dev/null; then
echo "Docker Compose is not installed. Please install Docker Compose first."
exit 1
fi
# Start n8n in Docker
echo "Starting n8n..."
docker-compose up -d n8n
# Wait for n8n to start
echo "Waiting for n8n to start..."
sleep 10
# Install dependencies
echo "Installing dependencies..."
pnpm install
# Start the application in development mode
echo "Starting the application..."
pnpm run dev
# Cleanup function
cleanup() {
echo "Stopping services..."
docker-compose down
exit 0
}
# Register cleanup function
trap cleanup INT TERM
# Keep the script running
wait