-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart_dev.sh
More file actions
73 lines (59 loc) · 1.88 KB
/
Copy pathstart_dev.sh
File metadata and controls
73 lines (59 loc) · 1.88 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/sh
echo "Caddy state is managed by Docker volumes."
ENV_FOLDER="backend"
ALERTMANAGER_FOLDER="alertmanager"
AUTH0JSON_FOLDER="frontend/labyrinth/src/"
echo "Setting up .env..."
source install_functions.sh
if [ -f "$ENV_FOLDER/.env" ]; then
echo ".env already exists. Do you want to skip? Enter is yes; any other input will create a new configuration."
read
if [ -z "$REPLY" ]; then
echo "Skipping Auth0 Configuration"
else
auth_zero
fi
else
auth_zero
fi
clear || cls
# Start up alertmanager and
if [ -f "$ALERTMANAGER_FOLDER/alertmanager.yml" ]; then
echo "alertmanager.yml already exists. Do you want to skip? Enter is yes; any other input will create a new configuration."
read
if [ -z "$REPLY" ]; then
echo "Skipping Alertmanager Configuration"
else
auth_zero
cp $ALERTMANAGER_FOLDER/alertmanager.sample.yml $ALERTMANAGER_FOLDER/alertmanager.yml
fi
else
cp $ALERTMANAGER_FOLDER/alertmanager.sample.yml $ALERTMANAGER_FOLDER/alertmanager.yml
fi
# Auth config JSON file
if [ -f "$AUTH0JSON_FOLDER/auth_config.json" ]; then
echo "auth_config.json exists. Continuing..."
else
auth_config
fi
if [ -z "${GITHUB}" ]; then
echo "Starting development docker..."
docker compose -f docker-compose-development.yml up --build -d
else
echo "[CI] Starting only CI dockers..."
# .env file - check if exists
ENV_FOLDER="backend"
echo "Setting up .env..."
if [ -f "$ENV_FOLDER/.env" ]; then
echo ".env already exists. Continuing."
else
cp $ENV_FOLDER/.env.sample $ENV_FOLDER/.env
fi
echo "Copying over alertmanager.yml..."
if [ -f "alertmanager/alertmanager.yml" ]; then
echo "alertmanager.yml already exists. Continuing..."
else
cp alertmanager/alertmanager.yml.development alertmanager/alertmanager.yml
fi
docker compose -f docker-compose-development.yml up --build -d mongo postgres redis backend alertmanager
fi