update appflowy.

This commit is contained in:
amass 2025-03-09 13:26:38 +08:00
parent 33261c721b
commit feb597a567

@ -34,6 +34,18 @@ CONTAINERS=(
appflowy_web
)
# for image in "${images[@]}"; do
# echo -e "\n\033[34m pulling image: ${image}\033[0m"
# if docker pull "${image}"; then
# echo -e "\033[32m pull successed: ${image}\033[0m"
# else
# echo -e "\033[31m pull failed: ${image}\033[0m" >&2
# fi
# done
# echo -e "\n\033[36m all images pull finished \033[0m"
function stop_containers() {
for container in "${CONTAINERS[@]}"; do
if docker ps -a --format '{{.Names}}' | grep -q "^${container}\$"; then
echo "delete $container"
@ -42,23 +54,15 @@ for container in "${CONTAINERS[@]}"; do
echo "$container not existed"
fi
done
}
for image in "${images[@]}"; do
echo -e "\n\033[34m pulling image: ${image}\033[0m"
if docker pull "${image}"; then
echo -e "\033[32m pull successed: ${image}\033[0m"
else
echo -e "\033[31m pull failed: ${image}\033[0m" >&2
fi
done
echo -e "\n\033[36m all images pull finished \033[0m"
function start_containers() {
stop_containers
docker run --restart=always --network host -d --name frpc \
-e TZ="Asia/Shanghai" \
-v /mnt/user/appdata/frpc/frpc.toml:/etc/frp/frpc.toml \
-v /mnt/user/appdata/frpc:/app \
registry.cn-shenzhen.aliyuncs.com/amass_toolset/frpc:0.61.1
registry.cn-shenzhen.aliyuncs.com/amass_toolset/frpc:0.61.2
docker run -d --name minio --restart=on-failure \
-p 9000:9000 \
@ -122,7 +126,6 @@ docker run -d --name appflowy_gotrue --restart=on-failure \
-e GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=${GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI} \
appflowyinc/gotrue:latest
docker run -d --name appflowy_cloud --restart=on-failure \
-p 8000:8000 \
-e RUST_LOG=${RUST_LOG:-info} \
@ -206,3 +209,19 @@ docker run -d --name appflowy_web \
-e AF_BASE_URL="${APPFLOWY_BASE_URL}" \
-e AF_GOTRUE_URL="${API_EXTERNAL_URL}" \
appflowyinc/appflowy_web:latest
}
function main() {
local cmd=$1
shift 1
case $cmd in
stop)
stop_containers
;;
*)
start_containers
;;
esac
}
main $@