1
0
mirror of https://github.com/craigerl/aprsd.git synced 2026-06-08 09:04:49 -04:00

Updates for building containers

This patch updates the Dockerfile for building the official container
image and includes the ability to load external pypi modules as plugins
at container startup.
This commit is contained in:
2020-12-15 10:27:53 -05:00
parent ba61178b14
commit 861fde6f83
4 changed files with 83 additions and 12 deletions
+16 -2
View File
@@ -1,6 +1,21 @@
#!/usr/bin/env bash
set -x
export PATH=$PATH:$HOME/.local/bin
export VIRTUAL_ENV=$HOME/.venv3
source $VIRTUAL_ENV/bin/activate
if [ ! -z "${APRS_PLUGINS}" ]; then
OLDIFS=$IFS
IFS=','
echo "Installing pypi plugins '$APRS_PLUGINS'";
for plugin in ${APRS_PLUGINS}; do
IFS=$OLDIFS
# call your procedure/other scripts here below
echo "Installing '$plugin'"
pip3 install $plugin
done
fi
# check to see if there is a config file
APRSD_CONFIG="/config/aprsd.yml"
@@ -8,5 +23,4 @@ if [ ! -e "$APRSD_CONFIG" ]; then
echo "'$APRSD_CONFIG' File does not exist. Creating."
aprsd sample-config > $APRSD_CONFIG
fi
aprsd server -c $APRSD_CONFIG
$VIRTUAL_ENV/bin/aprsd server -c $APRSD_CONFIG