diff --git a/docker-compose.yml b/docker-compose.yml index 205e609..6561456 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ services: haven: container_name: haven - image: haven + image: sudocarlos/haven build: . env_file: .env ports: diff --git a/release-to-dockerhub.sh b/release-to-dockerhub.sh new file mode 100755 index 0000000..92ef1fa --- /dev/null +++ b/release-to-dockerhub.sh @@ -0,0 +1,19 @@ +set -ex +# SET THE FOLLOWING VARIABLES +# docker hub username +USERNAME=sudocarlos +# image name +IMAGE=haven +# platforms +PLATFORM=linux/amd64 +# bump version +version=`awk -F "=" '/TAG=/{print $NF}' Dockerfile` +echo "Building version: $version" +# run build +docker buildx build -t $USERNAME/$IMAGE:latest -t $USERNAME/$IMAGE:$version --push . +# tag it +git add -A +git commit -m "haven-docker $version" +git tag -a "dockerhub-$version" -m "haven-docker $version" +git push +git push --tags \ No newline at end of file diff --git a/update-repo.sh b/update-repo.sh deleted file mode 100755 index 90ab39a..0000000 --- a/update-repo.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -LATEST_TAG=$(curl -s "https://api.github.com/repos/bitvora/haven/tags" | jq -r '.[0].name') -MASTER_COMMIT=$(curl -s "https://api.github.com/repos/bitvora/haven/commits" | jq -r '.[0].sha'[:7]) - -echo LATEST_TAG: $LATEST_TAG -echo MASTER_COMMIT: $MASTER_COMMIT - -docker build --load --build-arg TAG=$LATEST_TAG -t haven:latest -t haven:$LATEST_TAG . -docker build --load --build-arg TAG=$MASTER_COMMIT -t haven:master-$MASTER_COMMIT . - -wget -q https://raw.githubusercontent.com/bitvora/haven/refs/heads/master/.env.example -O .env.example -wget -q https://raw.githubusercontent.com/bitvora/haven/refs/heads/master/relays_blastr.example.json -O relays_blastr.example.json -wget -q https://raw.githubusercontent.com/bitvora/haven/refs/heads/master/relays_import.example.json -O relays_import.example.json