update appflowy.
This commit is contained in:
parent
33261c721b
commit
feb597a567
@ -34,6 +34,18 @@ CONTAINERS=(
|
|||||||
appflowy_web
|
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
|
for container in "${CONTAINERS[@]}"; do
|
||||||
if docker ps -a --format '{{.Names}}' | grep -q "^${container}\$"; then
|
if docker ps -a --format '{{.Names}}' | grep -q "^${container}\$"; then
|
||||||
echo "delete $container"
|
echo "delete $container"
|
||||||
@ -42,23 +54,15 @@ for container in "${CONTAINERS[@]}"; do
|
|||||||
echo "$container not existed"
|
echo "$container not existed"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
}
|
||||||
|
|
||||||
for image in "${images[@]}"; do
|
function start_containers() {
|
||||||
echo -e "\n\033[34m pulling image: ${image}\033[0m"
|
stop_containers
|
||||||
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"
|
|
||||||
|
|
||||||
docker run --restart=always --network host -d --name frpc \
|
docker run --restart=always --network host -d --name frpc \
|
||||||
-e TZ="Asia/Shanghai" \
|
-e TZ="Asia/Shanghai" \
|
||||||
-v /mnt/user/appdata/frpc/frpc.toml:/etc/frp/frpc.toml \
|
-v /mnt/user/appdata/frpc/frpc.toml:/etc/frp/frpc.toml \
|
||||||
-v /mnt/user/appdata/frpc:/app \
|
-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 \
|
docker run -d --name minio --restart=on-failure \
|
||||||
-p 9000:9000 \
|
-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} \
|
-e GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=${GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI} \
|
||||||
appflowyinc/gotrue:latest
|
appflowyinc/gotrue:latest
|
||||||
|
|
||||||
|
|
||||||
docker run -d --name appflowy_cloud --restart=on-failure \
|
docker run -d --name appflowy_cloud --restart=on-failure \
|
||||||
-p 8000:8000 \
|
-p 8000:8000 \
|
||||||
-e RUST_LOG=${RUST_LOG:-info} \
|
-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_BASE_URL="${APPFLOWY_BASE_URL}" \
|
||||||
-e AF_GOTRUE_URL="${API_EXTERNAL_URL}" \
|
-e AF_GOTRUE_URL="${API_EXTERNAL_URL}" \
|
||||||
appflowyinc/appflowy_web:latest
|
appflowyinc/appflowy_web:latest
|
||||||
|
}
|
||||||
|
|
||||||
|
function main() {
|
||||||
|
local cmd=$1
|
||||||
|
shift 1
|
||||||
|
case $cmd in
|
||||||
|
stop)
|
||||||
|
stop_containers
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
start_containers
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
main $@
|
||||||
|
Loading…
x
Reference in New Issue
Block a user