2022-11-29 21:05:20 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
2023-03-25 10:34:26 +01:00
|
|
|
echo "LN_BACKEND: $LN_BACKEND"
|
|
|
|
|
|
2022-11-29 21:05:20 +01:00
|
|
|
|
2023-03-12 08:18:37 +01:00
|
|
|
if [ "$LN_BACKEND" = "cln1" ]; then
|
2022-11-29 21:05:20 +01:00
|
|
|
cp /code/.env.cln1 /code/.env
|
2023-03-12 08:18:37 +01:00
|
|
|
elif [ "$LN_BACKEND" = "cln2" ]; then
|
2022-12-11 19:23:22 +01:00
|
|
|
cp /code/.env.cln2 /code/.env
|
2023-03-12 08:18:37 +01:00
|
|
|
elif [ "$LN_BACKEND" = "lnd1" ]; then
|
2022-11-29 21:05:20 +01:00
|
|
|
cp /code/.env.lnd1 /code/.env
|
2023-03-12 08:18:37 +01:00
|
|
|
elif [ "$LN_BACKEND" = "lnd2" ]; then
|
2022-12-11 19:23:22 +01:00
|
|
|
cp /code/.env.lnd2 /code/.env
|
2023-03-12 08:18:37 +01:00
|
|
|
elif [ "$LN_BACKEND" = "lnd3" ]; then
|
2022-12-11 19:23:22 +01:00
|
|
|
cp /code/.env.lnd3 /code/.env
|
|
|
|
|
else
|
|
|
|
|
echo "Unknown LN_BACKEND: $LN_BACKEND"
|
2022-11-29 21:05:20 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# wait until the nodes are ready
|
2023-03-25 10:34:26 +01:00
|
|
|
echo "Waiting for node $LN_BACKEND to finish bootstrapping..."
|
|
|
|
|
sleep 120
|
2022-11-29 21:05:20 +01:00
|
|
|
|
|
|
|
|
python3 -m uvicorn app.main:app --host 0.0.0.0 --port 80
|