diff --git a/.github/workflows/docker-image.yaml b/.github/workflows/docker-image.yaml index c2d9a7c..3b825a6 100644 --- a/.github/workflows/docker-image.yaml +++ b/.github/workflows/docker-image.yaml @@ -35,6 +35,7 @@ jobs: run: | echo "IMAGE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV echo "IMAGE_TAG=${IMAGE_TAG//./-}" >> $GITHUB_ENV + echo "RELEASE_TAG=,ghcr.io/${IMAGE_NAME}:latest" >> $GITHUB_ENV - name: Push to GitHub Container Registry uses: docker/build-push-action@v4 @@ -42,4 +43,4 @@ jobs: context: . file: ./Dockerfile push: true - tags: ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} + tags: ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}${{ env.RELEASE_TAG }} diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 119cf5a..02bb72a 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -79,9 +79,6 @@ screen -L -Logfile /var/vlogs/tor -dmS tor bash -c "tor -f /etc/tor/torrc" # Starting Redis server in detached mode screen -L -Logfile /var/vlogs/redis -dmS redis bash -c "redis-server --port 6479 --daemonize no --dir /data --appendonly yes" -# After 5 seconds, export the database to the WireGuard config file -screen -dm bash -c "sleep 5; curl -s -o /dev/null http://127.0.0.1:3000/api/wireguard/regen" - sleep 1 echo -e "\n======================== Versions ========================" echo -e "Alpine Version: \c" && cat /etc/alpine-release @@ -93,4 +90,7 @@ cat /etc/tor/torrc echo -e "========================================================\n" sleep 1 +# After 10 seconds, export the database to the WireGuard config file +screen -dm bash -c "sleep 10; curl -s -o /dev/null http://127.0.0.1:3000/api/wireguard/regen" + exec "$@"