🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2022-10-21 01:37:15 -04:00
parent 14dc31949f
commit c0d72f456f
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F
4 changed files with 7 additions and 7 deletions

View File

@ -36,7 +36,7 @@ RUN set -ex; \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8 && \
git clone -q "https://github.com/casjay-templates/denojs" "${DEFAULT_DATA_DIR}/htdocs/www" && \
cd "${DEFAULT_DATA_DIR}/htdocs/www" && /usr/local/bin/get-deno.sh
/usr/local/bin/get-deno.sh
RUN echo 'Running cleanup' ; \
apt-get clean ; \

View File

@ -205,7 +205,7 @@ fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Copy /config to /etc
if [ -d "/config" ]; then
echo "Copying /config to /etc"
[ "$DATA_DIR_INITIALIZED" = "false" ] && echo "Copying /config to /etc"
for create_conf in /config/*; do
if [ -n "$create_conf" ]; then
create_conf_name="$(basename "$create_conf")"

View File

@ -43,10 +43,11 @@ if curl -q -LSsf -o "$TMP_FILE" "$URL" && [ -f "$TMP_FILE" ]; then
mkdir -p "$TMP_DIR" && cd "$TMP_DIR" || exit 10
unzip -q "$TMP_FILE"
if [ -f "$TMP_DIR/deno" ]; then
cp -Rf "$TMP_DIR/deno" "$BIN_FILE" && chmod -Rf 755 "$BIN_FILE" || exit 10
cp -Rf "$TMP_DIR/deno" "$BIN_FILE" && chmod -Rf 755 "$BIN_FILE" || exitCode=10
[ -f "$BIN_FILE" ] && $BIN_FILE upgrade && exitCode=0 || exitCode=10
else
echo "Failed to extract deno from $TMP_FILE"
exit 10
exitCode=10
fi
else
echo "Failed to download deno from $URL"
@ -55,5 +56,4 @@ fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
rm -Rf "$TMP_FILE" "$TMP_DIR"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[ -f "$BIN_FILE" ] && $BIN_FILE upgrade && exit 0 || exit 10
exit ${exitCode:-0}

View File

@ -81,7 +81,7 @@ CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | a
#SERVICE_PORT=""
SERVICE_NAME="deno"
SERVICE_COMMAND="$SERVICE_NAME"
export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT"
export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Pre copy commands
@ -156,6 +156,7 @@ deno)
if __pgrep "$SERVICE_NAME" && [ ! -f "/tmp/$SERVICE_NAME.pid" ]; then
echo "$SERVICE_NAME is running"
else
echo "$exec_message" && exec_message=""
touch "/tmp/$SERVICE_NAME.pid"
if [ -n "$START_SCRIPT" ]; then
RUN_SCRIPT="$START_SCRIPT"
@ -168,7 +169,6 @@ deno)
elif [ -f "server.ts" ]; then
RUN_SCRIPT="server.ts"
fi
echo "Attempting to start deno"
__exec_command "$SERVICE_COMMAND" task start || __exec_command "$SERVICE_COMMAND" run --watch --allow-all "${@:-$RUN_SCRIPT}" ||
{
rm -Rf "/tmp/$SERVICE_NAME.pid"