forked from plandex-ai/plandex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start_local.sh
executable file
·42 lines (33 loc) · 1.08 KB
/
start_local.sh
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
#!/bin/bash
echo "Checking dependencies..."
if ! [ -x "$(command -v git)" ]; then
echo 'Error: git is not installed.' >&2
echo 'Please install git before running this setup script.' >&2
exit 1
fi
if ! [ -x "$(command -v docker)" ]; then
echo 'Error: docker is not installed.' >&2
echo 'Please install docker before running this setup script.' >&2
exit 1
fi
if ! [ -x "$(command -v docker-compose)" ]; then
echo 'Error: docker-compose is not installed.' >&2
echo 'Please install docker-compose before running this setup script.' >&2
exit 1
fi
# make sure that we are in the same directory as the script
cd "$(dirname "$0")"
# copy the _env file to .env unless it already exists
if [ -f .env ]; then
echo ".env file already exists, won't overwrite it with _env"
echo "Add any custom values to .env"
else
echo "Copying _env file to .env"
cp _env .env
echo ".env has been populated with default values"
echo "Add any custom values to .env"
fi
echo "Setup complete!"
echo "Starting the application..."
docker compose build
docker compose up