fix install
This commit is contained in:
61
install.zsh
61
install.zsh
@@ -18,6 +18,8 @@ function at-repos-env() {
|
|||||||
https://github.com/bluesky-social/ozone
|
https://github.com/bluesky-social/ozone
|
||||||
https://github.com/bluesky-social/jetstream
|
https://github.com/bluesky-social/jetstream
|
||||||
)
|
)
|
||||||
|
services=( bsky plc pds jetstream bgs ozone social-app )
|
||||||
|
img=( pds ozone-web bgs jetstream bsky ozone-daemon ozone plc social-app)
|
||||||
d=${0:a:h}
|
d=${0:a:h}
|
||||||
dh=${0:a:h:h}
|
dh=${0:a:h:h}
|
||||||
name=${host%%.*}
|
name=${host%%.*}
|
||||||
@@ -236,48 +238,38 @@ function at-repos-ozone-patch() {
|
|||||||
function at-repos-build-docker-atproto() {
|
function at-repos-build-docker-atproto() {
|
||||||
cd $d
|
cd $d
|
||||||
docker image prune -a
|
docker image prune -a
|
||||||
docker compose build --no-cache bsky plc pds jetstream bgs ozone
|
if [ -z "$1" ];then
|
||||||
|
for ((i=1; i<=${#services}; i++)); do
|
||||||
|
docker compose build --no-cache $i
|
||||||
|
done
|
||||||
|
else
|
||||||
|
docker compose build --no-cache $1
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function at-repos-build-docker-social() {
|
function at-repos-push-reset() {
|
||||||
cd $d
|
|
||||||
docker compose build --no-cache social-app
|
|
||||||
}
|
|
||||||
|
|
||||||
function at-repos-push-docker() {
|
|
||||||
docker restart registry
|
docker restart registry
|
||||||
docker stop registry
|
docker stop registry
|
||||||
docker rm registry
|
docker rm registry
|
||||||
docker volume rm registry-data 2>/dev/null || true
|
docker volume rm registry-data 2>/dev/null || true
|
||||||
docker run -d -p 5000:5000 --name registry \
|
docker run -d -p ${dport}:${dport} --name registry \
|
||||||
--restart=always \
|
--restart=always \
|
||||||
-v registry-data:/var/lib/registry \
|
-v registry-data:/var/lib/registry \
|
||||||
registry:2
|
registry:2
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
docker run -d -p ${dport}:${dport} --name registry --restart=always registry:2
|
docker run -d -p ${dport}:${dport} --name registry --restart=always registry:2
|
||||||
docker tag at-pds:latest localhost:${dport}/pds:latest
|
}
|
||||||
docker tag at-ozone-web:latest localhost:${dport}/ozone-web:latest
|
|
||||||
docker tag at-bgs:latest localhost:${dport}/bgs:latest
|
|
||||||
docker tag at-jetstream:latest localhost:${dport}/jetstream:latest
|
|
||||||
docker tag at-bsky:latest localhost:${dport}/bsky:latest
|
|
||||||
docker tag at-ozone-daemon:latest localhost:${dport}/ozone-daemon:latest
|
|
||||||
docker tag at-ozone:latest localhost:${dport}/ozone:latest
|
|
||||||
docker tag at-plc:latest localhost:${dport}/plc:latest
|
|
||||||
docker tag at-social-app:latest localhost:${dport}/social-app:latest
|
|
||||||
|
|
||||||
docker push localhost:${dport}/pds:latest
|
function at-repos-push-docker() {
|
||||||
docker push localhost:${dport}/ozone-web:latest
|
if [ -z "$1" ];then
|
||||||
docker push localhost:${dport}/bgs:latest
|
for ((i=1; i<=${#img}; i++)); do
|
||||||
docker push localhost:${dport}/jetstream:latest
|
docker tag at-${i}:latest localhost:${dport}/${i}:latest
|
||||||
docker push localhost:${dport}/bsky:latest
|
docker push localhost:${dport}/${i}:latest
|
||||||
docker push localhost:${dport}/ozone-daemon:latest
|
done
|
||||||
docker push localhost:${dport}/ozone:latest
|
else
|
||||||
docker push localhost:${dport}/plc:latest
|
docker tag at-${1}:latest localhost:${dport}/${1}:latest
|
||||||
docker push localhost:${dport}/social-app:latest
|
docker push localhost:${dport}/${1}:latest
|
||||||
|
fi
|
||||||
cd $d
|
|
||||||
docker compose down
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function at-repos-pull-docker() {
|
function at-repos-pull-docker() {
|
||||||
@@ -291,6 +283,7 @@ function at-origin-social-app() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
at-repos-env
|
at-repos-env
|
||||||
|
at-repos-push-reset
|
||||||
case "`cat /etc/hostname`" in
|
case "`cat /etc/hostname`" in
|
||||||
at)
|
at)
|
||||||
at-repos-pull-docker
|
at-repos-pull-docker
|
||||||
@@ -315,15 +308,13 @@ case "`cat /etc/hostname`" in
|
|||||||
at-repos-atproto-service-bsky-api-patch
|
at-repos-atproto-service-bsky-api-patch
|
||||||
at-repos-atproto-service-pds-index-patch
|
at-repos-atproto-service-pds-index-patch
|
||||||
at-repos-ozone-patch
|
at-repos-ozone-patch
|
||||||
at-repos-build-docker-social
|
if [ -n "$1" ];then
|
||||||
if [ -n "$1" ] && [ "$1" = "s" ];then
|
at-repos-build-docker-atproto $1
|
||||||
docker run -d -p ${dport}:${dport} --name registry --restart=always registry:2
|
|
||||||
docker tag at-social-app:latest localhost:${dport}/social-app:latest
|
|
||||||
docker push localhost:${dport}/social-app:latest
|
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
at-repos-build-docker-atproto
|
at-repos-build-docker-atproto
|
||||||
at-repos-push-docker
|
at-repos-push-docker
|
||||||
|
cd $d; docker compose down
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user