-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·34 lines (27 loc) · 905 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
#!/bin/sh
# *******************************************************************
# * Author: 2024 Luigi Pizzolito (@https://github.com/Luigi-Pizzolito)
# *******************************************************************
# navigate to this scripts directory
cd "$(dirname "$0")" || exit
cd docker-template
# remove old docker-compose.yml if it exists
if [ -f "../docker-compose.yml" ]; then
rm ../docker-compose.yml
fi
# create and activate VENV
echo "setup.sh: Entering Python VENV"
if [ ! -d "venv" ]; then
python3 -m venv venv
fi
source venv/bin/activate
# install Jinja
echo "setup.sh: Satisfying requirements"
# export SOCKS_PROXY=socks5://10.197.88.68:10808
pip install Jinja2
# run Jinja template
echo "setup.sh: Creating docker-compose.yml template"
python generate_template.py
# suggest run
echo "setup.sh: Execute the following command to launch:"
echo "docker compose up --build"