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