-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathentrypoint.sh
executable file
·45 lines (38 loc) · 1.2 KB
/
entrypoint.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
43
44
45
#!/bin/bash
mkdir -p "$SMB_MOUNT_POINT"
if mount -t cifs -o username="$SMB_USER",password="$SMB_PASSWORD",uid=1000,gid=1000 "$SMB_URL" "$SMB_MOUNT_POINT"; then
echo "Mount success!"
else
echo "Mount failed!"
exit 1
fi
if [ "$1" = "manager" ]; then
echo "Running the manager"
cd /app/manager
rm -rfd *.sqlite3
find . -type d -name "__pycache__" -exec rm -rdf {} +
find . -type d -name "migrations" -exec rm -rdf {} +
redis-server /etc/redis/redis.conf
python manage.py makemigrations manager
python manage.py migrate manager
python manage.py migrate
if [ "$2" = "debug" ]; then
python -m debugpy --listen 0.0.0.0:5678 --wait-for-client /app/manager/manage.py runserver 0.0.0.0:8000
else
python manage.py runserver 0.0.0.0:8000
fi
elif [ "$1" = "node" ]; then
pip install -e /app/node
export NODE_NAME=test_node
bash
elif [ "$1" = "cli" ]; then
pip install -e /app/cli
mkdir -p ~/.config/amuman
echo 'manager_url = "http://amuman-manager:8000"
shared_dir_root = "/nas"' > ~/.config/amuman/amuman.toml
amuman-cli --install-completion bash
source ~/.bash_completions/amuman-cli.sh
bash
else
exec "$@"
fi