ai/at
1
0

fix docker compose

This commit is contained in:
2025-12-03 19:34:47 +09:00
parent fa7ff974b8
commit 183dd41f2e
2 changed files with 31 additions and 39 deletions

View File

@@ -48,8 +48,7 @@ services:
- ./envs/pds
volumes:
- ./data/pds/:/data/
- ./repos/atproto/services/pds/index.js:/app/run-pds.js
command: ['node', '--enable-source-maps', '/app/run-pds.js']
command: node --enable-source-maps index.js
depends_on:
database:
condition: service_healthy
@@ -66,8 +65,7 @@ services:
user: root
volumes:
- ./data/bsky/:/data/
- ./repos/atproto/services/bsky/api.js:/app/run-bsky.js
command: ['node', '--enable-source-maps', '/app/run-bsky.js']
command: node --enable-source-maps api.js
depends_on:
database:
condition: service_healthy

View File

@@ -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,40 @@ 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
service=${services[$i]}
docker compose build --no-cache $service
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
img=${imgs[$i]}
docker tag at-${img}:latest localhost:${dport}/${img}:latest
docker push localhost:${dport}/${img}: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 +291,7 @@ case "`cat /etc/hostname`" in
exit
;;
*)
at-repos-push-reset
at-repos-clone
at-repos-pull
at-repos-social-app-icon
@@ -315,15 +310,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