chore: remove unused docker compose and entrypoint files
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
services:
|
|
||||||
web:
|
|
||||||
image: nginx:alpine
|
|
||||||
ports:
|
|
||||||
- "45554:80"
|
|
||||||
volumes:
|
|
||||||
- ./entrypoint.sh:/entrypoint.sh:ro
|
|
||||||
entrypoint: ["/bin/sh", "/entrypoint.sh"]
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
WEBROOT="/usr/share/nginx/html"
|
|
||||||
GITEA_URL="https://gitea.reversed.dev"
|
|
||||||
GITEA_REPO="space/time-until"
|
|
||||||
|
|
||||||
echo "Fetching latest release"
|
|
||||||
|
|
||||||
RELEASE_JSON=$(wget -qO- \
|
|
||||||
"$GITEA_URL/api/v1/repos/$GITEA_REPO/releases/latest")
|
|
||||||
|
|
||||||
ASSET_URL=$(echo "$RELEASE_JSON" | sed -n 's/.*"browser_download_url" *: *"\([^"]*dist\.zip[^"]*\)".*/\1/p' | head -1)
|
|
||||||
|
|
||||||
if [ -z "$ASSET_URL" ]; then
|
|
||||||
echo "ERROR: No dist.zip found in latest release"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Downloading $ASSET_URL ..."
|
|
||||||
wget -qO /tmp/dist.zip --header="$AUTH_HEADER" "$ASSET_URL"
|
|
||||||
|
|
||||||
echo "Extracting to $WEBROOT ..."
|
|
||||||
rm -rf "${WEBROOT:?}"/*
|
|
||||||
unzip -o /tmp/dist.zip -d "$WEBROOT"
|
|
||||||
rm /tmp/dist.zip
|
|
||||||
|
|
||||||
echo "Starting nginx ..."
|
|
||||||
exec nginx -g "daemon off;"
|
|
||||||
Reference in New Issue
Block a user