-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.sh
executable file
·39 lines (29 loc) · 921 Bytes
/
setup.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
#!/bin/bash
# Check if three arguments are provided
if [ "$#" -ne 3 ]; then
echo "Error: Three arguments are required."
echo "Usage: ./deploy.sh <host> <user> <password>"
exit 1
fi
# Assign input arguments to variables
host=$1
user=$2
password=$3
# # Get the absolute path to the script's directory
# SCRIPT_DIR=$(dirname "$(readlink -f "$0")")
# # Change the working directory to the script's directory
# cd "$SCRIPT_DIR"
# Check if python3 is available
if command -v python3 &>/dev/null; then
python_executable="python3"
else
python_executable="python"
fi
# Run python script with input arguments
python3 encode_special_chars.py "$host" "$user" "$password"
# Build Docker images
docker-compose build
# Start Docker containers
docker-compose up -d
# Direct user to airflow UI
echo "Navigate to localhost:8080 to access the Airflow UI and login using "airflow" as the username and password"